home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 016a / 4dos4d.zip / 4DOS.DOC
Text File  |  1991-11-01  |  981KB  |  21,363 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                          44
  10.                         44
  11.                        44      DDDDDDD        OOOOO        SSSSSS
  12.                       44       DDDDDDDD      OOOOOOO      SSSSSSSS
  13.                      44  44    DD     DD    OO     OO    SS
  14.                     44   44    DD     DD    OO     OO    SS
  15.                    44    44    DD     DD    OO     OO     SSSSSS
  16.                   444444444    DD     DD    OO     OO      SSSSSS
  17.                    44444444    DD     DD    OO     OO           SS
  18.                          44    DD     DD    OO     OO           SS
  19.                          44    DDDDDDDD      OOOOOOO     SSSSSSSS
  20.                          44    DDDDDDD        OOOOO       SSSSSS
  21.  
  22.  
  23.  
  24.                                        Version 4.00
  25.  
  26.  
  27.  
  28.  
  29.                                        Developed By
  30.                                   Rex Conn and Tom Rawson
  31.  
  32.  
  33.                                      Documentation By
  34.                          Hardin Brothers, Tom Rawson, and Rex Conn
  35.  
  36.  
  37.  
  38.                                        Published By
  39.  
  40.                                      JP Software Inc.
  41.                                        P.O. Box 1470
  42.                                  East Arlington, MA 02174
  43.                                             USA
  44.                                       (617) 646-3975
  45.                                     fax (617) 646-0904
  46.  
  47.  
  48.  
  49.  
  50.               Program and Documentation Copyright 1988, 1989, 1990, 1991,
  51.               Rex C. Conn and JP Software Inc., All Rights Reserved.  4DOS
  52.               is a registered trademark and 4OS2 is a trademark of JP
  53.               Software Inc.  Other product and company names are trademarks
  54.               of their respective owners.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.                                     ACKNOWLEDGMENTS
  61.  
  62.  
  63.  
  64.  
  65.               We couldn't produce a product like 4DOS without the dedication
  66.               and quality work of many people.  Our thanks to:
  67.  
  68.                    JP Software Staff:  Mike Bessy, Helen Coyne, Hayyim
  69.                    Feldman, Henry Harvey, Susan Mampre, Ellen Stone, Misty
  70.                    White.
  71.  
  72.                    Beta Test Support:  David Moskowitz, Guy Scharf, Larry
  73.                    Finkelstein, and Martin Schiff, of CompuServe's CONSULT
  74.                    forum.
  75.  
  76.                    Online Support:  Brian Miller and Tess Heder of Channel 1
  77.                    BBS; Don Watkins and Connie Kageyama of CompuServe's
  78.                    IBMNET.
  79.  
  80.                    Help System:  Scott McGrath and Ross Neilson Wentworth.
  81.  
  82.                    Beta Testers:  We can't list all of our beta testers
  83.                    here!  A special thanks to all of you who helped make
  84.                    4DOS elegant, reliable, and friendly.
  85.  
  86.  
  87.  
  88.               The following tools are used in creating and maintaining 4DOS
  89.               and the 4DOS Help System:
  90.                  Compilers:        Microsoft C 6.0 and Macro Assembler 5.1
  91.                                    and 6.0, Borland Turbo Pascal 5.5 and 6.0
  92.                  Libraries:        Object Professional (Turbo Power
  93.                                    Software), Spontaneous Assembly (Base Two
  94.                                    Development)
  95.                  Editors:          Edix (Emerging Technology), Brief
  96.                                    (Solution Systems)
  97.                  Debuggers:        Periscope (The Periscope Company), Soft-
  98.                                    ICE (Nu-Mega Technologies)
  99.                  Version Control:  PVCS (Sage Software)
  100.                  Documentation:    Microsoft Word for Windows with Adobe Type
  101.                                    Manager
  102.  
  103.                                                                      CONTENTS
  104.           ___________________________________________________________________
  105.  
  106.  
  107.  
  108.           CONTENTS
  109.  
  110.  
  111.           Introduction...............................................1
  112.                How to Use This Manual................................2
  113.                Registration and Upgrade Information..................5
  114.                Technical Support.....................................7
  115.  
  116.           Chapter 1 / 4DOS Features..................................9
  117.  
  118.           Chapter 2 / Installation..................................13
  119.                Automated Installation...............................13
  120.                Manual Installation..................................14
  121.                Uninstalling 4DOS....................................15
  122.  
  123.           Chapter 3 / A Guided Tour of 4DOS.........................18
  124.                Starting The Tour....................................18
  125.                Basic Commands.......................................20
  126.                Command Line Editing and History.....................24
  127.                More About Files.....................................27
  128.                Directory Navigation.................................31
  129.                Aliases..............................................33
  130.                Other Commands.......................................36
  131.                Batch Programming....................................38
  132.                Conclusion...........................................40
  133.  
  134.           Chapter 4 / General Concepts..............................41
  135.                DOS and the Command Interpreter......................41
  136.                     Primary and Secondary Shells....................42
  137.                     AUTOEXEC.BAT, 4START, and 4EXIT.................43
  138.                Command Processing...................................43
  139.                Files and Paths......................................45
  140.                The Environment......................................48
  141.                Memory...............................................49
  142.                ASCII and Key Codes..................................51
  143.                The Keyboard.........................................51
  144.                Video................................................52
  145.                ANSI Drivers.........................................53
  146.  
  147.           Chapter 5 / Using 4DOS....................................54
  148.                At the Command Line..................................54
  149.                     Command Line Editing............................55
  150.                     Command History and Recall......................56
  151.                     Command History Window..........................58
  152.                     Filename Completion.............................59
  153.                     Multiple Commands...............................61
  154.                     Automatic Directory Changes.....................61
  155.  
  156.  
  157.           ___________________________________________________________________
  158.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  i
  159.  
  160.                                                                      CONTENTS
  161.           ___________________________________________________________________
  162.  
  163.  
  164.                     Temporarily Disabling Aliases...................62
  165.                     Command Line Help...............................62
  166.                Input and Output.....................................65
  167.                     Redirection.....................................65
  168.                     Piping..........................................67
  169.                     Keystack........................................68
  170.                File Processing......................................70
  171.                     Extended Parent Directory Names.................71
  172.                     Wildcards.......................................71
  173.                     Multiple Filenames..............................73
  174.                     Include Lists...................................74
  175.                     Executable Extensions...........................75
  176.                The Environment......................................78
  177.                     4DOS Configuration Variables....................80
  178.                     4DOS Internal Variables.........................81
  179.                     4DOS Variable Functions.........................85
  180.                Advanced Features....................................91
  181.                     Conditional Commands............................91
  182.                     Command Grouping................................91
  183.                     Escape Character................................93
  184.                     Argument Quoting................................94
  185.                Aliases..............................................96
  186.                Batch Files..........................................98
  187.                     .BAT Files and .BTM Files.......................99
  188.                     Echoing.........................................99
  189.                     Batch File Variables...........................100
  190.                     Batch File Commands............................101
  191.                     Batch File Tips................................103
  192.  
  193.           Chapter 6 / Options and Tuning...........................109
  194.                Configuration Files.................................109
  195.                Setting up CONFIG.SYS...............................110
  196.                     4DOS and DOS 2.................................113
  197.                     Startup Options for Secondary Shells...........113
  198.                Using AUTOEXEC.BAT..................................114
  199.                Using 4START and 4EXIT..............................117
  200.                Using the 4DOS.INI File.............................118
  201.                     Types of Directives............................121
  202.                     Initialization Directives......................124
  203.                     Configuration Directives.......................127
  204.                     Color Directives...............................130
  205.                     Key Mapping Directives.........................131
  206.                     Advanced Directives............................135
  207.                     Examples.......................................137
  208.  
  209.           Chapter 7 / Using 4DOS with Your Hardware and Software...139
  210.                Hardware............................................139
  211.                     The CPU........................................139
  212.  
  213.  
  214.           ___________________________________________________________________
  215.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  ii
  216.  
  217.                                                                      CONTENTS
  218.           ___________________________________________________________________
  219.  
  220.  
  221.                     Memory.........................................140
  222.                     Video..........................................142
  223.                     Hard Drives and Floppy Disks...................144
  224.                     Laptop and Notebook Computers..................145
  225.                     Critical Errors................................147
  226.                Software............................................148
  227.                     4DOS and DOS...................................149
  228.                     Using 4DOS with Task Switchers and Multitaskers149
  229.                     Multitasking and Disk Swapping.................151
  230.                     4DOS and Microsoft Windows 3.0.................152
  231.                     4DOS and DESQView..............................153
  232.                     Using 4DOS on a Network........................154
  233.                Solving Software Compatibility Problems.............156
  234.  
  235.           Chapter 8 / Command Reference Guide......................162
  236.                4DOS Commands.......................................162
  237.                How to Use the Command Descriptions.................164
  238.                ?...................................................168
  239.                ALIAS...............................................169
  240.                ATTRIB..............................................178
  241.                BEEP................................................180
  242.                BREAK...............................................181
  243.                CALL................................................183
  244.                CANCEL..............................................184
  245.                CD / CHDIR..........................................185
  246.                CDD.................................................187
  247.                CHCP................................................189
  248.                CLS.................................................190
  249.                COLOR...............................................192
  250.                COPY................................................193
  251.                CTTY................................................198
  252.                DATE................................................199
  253.                DEL / ERASE.........................................200
  254.                DELAY...............................................202
  255.                DESCRIBE............................................203
  256.                DIR.................................................204
  257.                DIRS................................................210
  258.                DRAWBOX.............................................211
  259.                DRAWHLINE...........................................213
  260.                DRAWVLINE...........................................214
  261.                ECHO................................................215
  262.                ECHOS...............................................217
  263.                ENDLOCAL............................................218
  264.                ESET................................................219
  265.                EXCEPT..............................................220
  266.                EXIT................................................222
  267.                FOR.................................................223
  268.                FREE................................................227
  269.  
  270.  
  271.           ___________________________________________________________________
  272.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  iii
  273.  
  274.                                                                      CONTENTS
  275.           ___________________________________________________________________
  276.  
  277.  
  278.                GLOBAL..............................................228
  279.                GOSUB...............................................230
  280.                GOTO................................................232
  281.                HELP................................................234
  282.                HISTORY.............................................236
  283.                IF..................................................238
  284.                IFF.................................................244
  285.                INKEY...............................................246
  286.                INPUT...............................................249
  287.                KEYSTACK............................................250
  288.                LH / LOADHIGH.......................................254
  289.                LIST................................................255
  290.                LOADBTM.............................................257
  291.                LOG.................................................259
  292.                MD / MKDIR..........................................261
  293.                MEMORY..............................................262
  294.                MOVE................................................263
  295.                PATH................................................267
  296.                PAUSE...............................................269
  297.                POPD................................................270
  298.                PROMPT..............................................271
  299.                PUSHD...............................................274
  300.                QUIT................................................276
  301.                RD / RMDIR..........................................277
  302.                REBOOT..............................................278
  303.                REM.................................................280
  304.                REN / RENAME........................................281
  305.                RETURN..............................................283
  306.                SCREEN..............................................284
  307.                SCRPUT..............................................285
  308.                SELECT..............................................286
  309.                SET.................................................291
  310.                SETDOS..............................................294
  311.                SETLOCAL............................................298
  312.                SHIFT...............................................299
  313.                SWAPPING............................................300
  314.                TEE.................................................301
  315.                TEXT................................................302
  316.                TIME................................................303
  317.                TIMER...............................................304
  318.                TRUENAME............................................306
  319.                TYPE................................................307
  320.                UNALIAS.............................................308
  321.                UNSET...............................................309
  322.                VER.................................................310
  323.                VERIFY..............................................311
  324.                VOL.................................................312
  325.                VSCRPUT.............................................313
  326.  
  327.  
  328.           ___________________________________________________________________
  329.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  iv
  330.  
  331.                                                                      CONTENTS
  332.           ___________________________________________________________________
  333.  
  334.  
  335.                Y...................................................314
  336.  
  337.           Appendix A / 4DOS Error Messages.........................315
  338.  
  339.           Appendix B / ASCII and Key Codes.........................325
  340.                ASCII...............................................325
  341.                Keys and Key Codes..................................329
  342.  
  343.           Appendix C / Technical Information.......................335
  344.                Detecting 4DOS......................................335
  345.                     Detecting 4DOS From a Batch File...............335
  346.                     Detecting 4DOS From a Program..................335
  347.                     Detecting the 4DOS Prompt......................336
  348.                Placing Keystrokes Into the Keystack................336
  349.                Writing Installable Commands........................337
  350.                Using DESCRIPT.ION..................................338
  351.                Interrupt 2E........................................339
  352.  
  353.           Glossary.................................................342
  354.  
  355.           Index....................................................354
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.           ___________________________________________________________________
  386.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  v
  387.  
  388.                                                        CONTACTING JP SOFTWARE
  389.           ___________________________________________________________________
  390.  
  391.  
  392.  
  393.  
  394.           CONTACTING JP SOFTWARE
  395.  
  396.           You can contact JP Software at any of the following addresses.  Our
  397.           normal business hours are 9:00 AM to 5:00 PM weekdays, eastern US
  398.           time.  For more information about contacting us for technical
  399.           support see page 7.
  400.  
  401.  
  402.               By mail:
  403.  
  404.                    JP Software Inc.
  405.                    P.O. Box 1470
  406.                    East Arlington, MA 02174
  407.                    USA
  408.  
  409.  
  410.               By telephone:
  411.                    Voice:          (617) 646-3975
  412.                    Fax:            (617) 646-0904
  413.                    Order Line:     (800) 368-8777 (orders only,
  414.                                    USA only)
  415.  
  416.  
  417.               Electronically:
  418.  
  419.                    CompuServe:     General 75300,210
  420.                                    Technical Support 75300,1215
  421.                    Bix:            "trawson"
  422.                    MCI Mail:       470-7811
  423.                    Internet:       General 75300.210@compuserve.com
  424.                                    Technical Support
  425.                                      75300.1215@compuserve.com
  426.                    BBS Support:    Via Channel 1 BBS, Boston,
  427.                                    617-354-8873 at 2400 baud, no
  428.                                    parity, 8 data bits, 1 stop bit
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.           ___________________________________________________________________
  443.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  vi
  444.  
  445.                                                                  INTRODUCTION
  446.           ___________________________________________________________________
  447.  
  448.  
  449.  
  450.           INTRODUCTION
  451.  
  452.  
  453.           Welcome, and thanks for purchasing 4DOS!
  454.  
  455.           We started developing 4DOS when we realized that our computers
  456.           could be a lot more powerful and a lot more helpful than they were.
  457.           Whether you are a computer novice or an experienced power user, we
  458.           think that 4DOS will help you get the most out of your IBM PC or
  459.           compatible computer.
  460.  
  461.           Technically, 4DOS is a command interpreter or "DOS Shell."  That
  462.           means that it reacts to the commands you type at the C> prompt.
  463.           We've designed 4DOS so that you don't have to change your computing
  464.           habits or unlearn anything to use it.  If you know how to display a
  465.           directory, copy a file, or start an application program, you
  466.           already know how to use 4DOS.  4DOS understands all of the commands
  467.           you know and adds to them.  Its purpose is to make DOS friendlier,
  468.           easier to use, and much more powerful and versatile, without
  469.           requiring you to use or learn a new program, a new set of commands,
  470.           or a new style of work.
  471.  
  472.           Once you have 4DOS installed, you can learn its new features at
  473.           your own pace.  It has more than 40 new commands and scores of
  474.           enhanced features, but you don't have to learn them all at once.
  475.           Relax, enjoy 4DOS's power, and browse through the manual
  476.           occasionally.  Press the F1 key whenever you need help.  4DOS will
  477.           soon become an essential part of your computer, and you'll wonder
  478.           how you ever got along without it.
  479.  
  480.           If you want to take 4DOS for a spin without performing a complete
  481.           installation, see the Guided Tour beginning on page 18.
  482.  
  483.           We are constantly working to improve 4DOS.  If you have suggestions
  484.           for features or commands that you think we should include in the
  485.           next version, or any other way we could improve our product, please
  486.           let us know.  Many of the improvements in this version of 4DOS were
  487.           suggested by our users, and while we can't promise to include every
  488.           suggested feature, we really do appreciate and pay attention to
  489.           your comments.
  490.  
  491.           If you're an OS/2 user, JP Software offers another product, 4OS2,
  492.           as a complete replacement for the OS/2 command processor (CMD.EXE).
  493.           4OS2 provides the same command set and syntax as 4DOS, with several
  494.           OS/2 commands added.  You can use it to maintain a common working
  495.           environment and run the same batch files under OS/2 and DOS.  4OS2
  496.  
  497.  
  498.  
  499.           ___________________________________________________________________
  500.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  1
  501.  
  502.                                                                  INTRODUCTION
  503.           ___________________________________________________________________
  504.  
  505.  
  506.           is available at a discounted price for 4DOS users.  Contact JP
  507.           Software for more information.
  508.  
  509.  
  510.           How to Use This Manual
  511.  
  512.               We have designed this manual to serve as a gentle introduction
  513.               to 4DOS for novice users, as a tutorial for those who want to
  514.               get the most out of 4DOS, and as a reference manual for
  515.               advanced 4DOS users.
  516.  
  517.               You will likely find some parts of the manual too simple or
  518.               too technical for your tastes.  Unless you are convinced that
  519.               one of those sections holds just the information you need for
  520.               a specific task, feel free to skip to the next part of the
  521.               manual that is more to your liking.  You can use almost every
  522.               feature of 4DOS without having to worry about other features
  523.               or commands.
  524.  
  525.               As you read the manual, you will see the symbol ## next to
  526.               certain paragraphs.  This indicates a more in-depth discussion
  527.               or a more advanced topic which you can skip if you wish to
  528.               stick with the basics.  Come back to this topic later for more
  529.               details, or if you're having trouble with the particular issue
  530.               it discusses.  In many cases, the remainder of the section
  531.               you're reading after such a symbol will be devoted to similar
  532.               advanced information.  If you see the ## next to a section
  533.               heading, it means the entire section contains such
  534.               information.
  535.  
  536.               You may find the information in such marked sections useful
  537.               even if you're relatively new to computers or to 4DOS.
  538.               However you can skip the marked section and still understand
  539.               and use the basic topic of the section you're reading.
  540.  
  541.               An exclamation point [!] to the left of a paragraph means that
  542.               paragraph contains a caution or warning you may need to
  543.               observe when using the feature it discusses.
  544.  
  545.               This manual is divided into eight chapters and three
  546.               appendices, plus a glossary and index.  Here's a brief
  547.               overview of what you'll find in each:
  548.  
  549.               Chapter 1 / 4DOS Features
  550.  
  551.                    We begin with a short summary of some of 4DOS's features
  552.                    to give you a taste of what 4DOS is about.  Start here if
  553.                    you are new to 4DOS.
  554.  
  555.  
  556.           ___________________________________________________________________
  557.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  2
  558.  
  559.                                                                  INTRODUCTION
  560.           ___________________________________________________________________
  561.  
  562.  
  563.               Chapter 2 / Installation
  564.  
  565.                    Everyone should read this short chapter.  The
  566.                    installation instructions are simple (and quite different
  567.                    from previous versions of 4DOS).
  568.  
  569.               Chapter 3 / A Guided Tour of 4DOS
  570.  
  571.                    This chapter will take you on a short, interactive tour
  572.                    of some of 4DOS's most powerful features.  By the time
  573.                    you finish the tour, you will have a good idea of what
  574.                    4DOS will do for you.  If you are new to 4DOS, be sure to
  575.                    take the tour.
  576.  
  577.               Chapter 4 / General Concepts
  578.  
  579.                    This reference chapter is an introduction to several
  580.                    terms and concepts that we use throughout the manual.  If
  581.                    you're a novice, you might want to browse through the
  582.                    entire chapter.  If you're a power user and all of the
  583.                    topics in this chapter seem simple, then go on to the
  584.                    next chapter.  If you think you need to brush up a bit on
  585.                    the basics of a couple of terms and ideas, you'll
  586.                    probably find them here.
  587.  
  588.               Chapter 5 / Using 4DOS
  589.  
  590.                    This chapter is for everyone.  It contains a description
  591.                    of 4DOS's features and lots of examples to help you learn
  592.                    to use each one.  Even if you are a novice user and want
  593.                    to ignore some of these features until later, skim
  594.                    through this chapter to get an idea of what is available
  595.                    and where to find the information that you will
  596.                    eventually want.  4DOS offers both features which are not
  597.                    related to specific commands, and a complete set of over
  598.                    80 internal commands.  This chapter has complete
  599.                    reference information on all of the non-command features,
  600.                    and introduces a few commands as well.  Reference
  601.                    information on 4DOS commands is in Chapter 8.
  602.  
  603.               Chapter 6 / Options and Tuning
  604.  
  605.                    This chapter is for advanced users who want to be sure
  606.                    that 4DOS is running at top efficiency on their systems.
  607.                    It includes detailed information on setting up 4DOS and
  608.                    on changing your 4DOS configuration.
  609.  
  610.  
  611.  
  612.  
  613.           ___________________________________________________________________
  614.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  3
  615.  
  616.                                                                  INTRODUCTION
  617.           ___________________________________________________________________
  618.  
  619.  
  620.               Chapter 7 / Using 4DOS With Your Hardware and Software
  621.  
  622.                    This chapter contains tips on using 4DOS with many
  623.                    popular kinds of PC hardware and software, and
  624.                    information that will be useful if you think 4DOS may
  625.                    conflict with your hardware or other software.
  626.  
  627.               Chapter 8 / 4DOS Command Reference
  628.  
  629.                    4DOS knows over 80 internal commands.  This chapter
  630.                    explains the purpose of each command and tells you how to
  631.                    use it.  It has examples that will help you learn each
  632.                    command and the technical details you will need to get
  633.                    the command to behave exactly as you wish.
  634.  
  635.               Appendices
  636.  
  637.                    We've included some helpful tables here, and some
  638.                    information for those who like to know technical details.
  639.                    There are three appendices.
  640.  
  641.                    Appendix A lists all 4DOS error messages.  Look here if
  642.                    you need an explanation of an error message, or if you
  643.                    aren't sure if the message came from 4DOS.
  644.  
  645.                    Appendix B lists codes for the ASCII character set (your
  646.                    computer's internal method for representing letters,
  647.                    digits, and other characters) and for the keys on your
  648.                    keyboard.  These codes can be useful with certain 4DOS
  649.                    commands.
  650.  
  651.                    Appendix C covers technical information and programming
  652.                    interfaces.  You shouldn't need to use it unless you are
  653.                    an advanced user or a programmer writing add-on software
  654.                    for 4DOS.
  655.  
  656.               Glossary
  657.  
  658.                    If you need help with any of the terminology in this
  659.                    manual, look here.
  660.  
  661.               Index
  662.  
  663.                    If you can't find the information you need, this should
  664.                    help you find it.
  665.  
  666.  
  667.  
  668.  
  669.  
  670.           ___________________________________________________________________
  671.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  4
  672.  
  673.                                                                  INTRODUCTION
  674.           ___________________________________________________________________
  675.  
  676.  
  677.               Quick Reference Card
  678.  
  679.                    If you can't remember a key combination, command format,
  680.                    color name, or other general information, look here.
  681.                    Whether you are a 4DOS novice or expert, you will
  682.                    probably want to keep the Quick Reference card near your
  683.                    computer for those times when you need just a small jog
  684.                    to your memory.
  685.  
  686.               Additional Files
  687.  
  688.                    Files distributed with 4DOS cover important additional
  689.                    information beyond what's included in this manual.
  690.                    README.DOC contains general notes, highlights of the
  691.                    latest release, and brief installation instructions for
  692.                    those upgrading from a downloaded copy of 4DOS.
  693.                    UPDATE.DOC covers any changes or corrections in the
  694.                    manual, and detailed information for users with older
  695.                    versions on what has changed in the latest release.
  696.                    APPNOTES.DOC contains application notes for a variety of
  697.                    other software packages to help you use those packages to
  698.                    best advantage with 4DOS.
  699.  
  700.  
  701.           Registration and Upgrade Information
  702.  
  703.               If you purchased 4DOS from a software dealer, your copy came
  704.               with a registration card.  Please fill out this card and
  705.               return it promptly to JP Software.  Returning the registration
  706.               card ensures that we have a record of your registration, and
  707.               enables you to receive ongoing technical support and notices
  708.               of upgrades.  If you purchased 4DOS directly from JP Software,
  709.               you are already registered and no registration card is
  710.               necessary.
  711.  
  712.               Once you are a registered 4DOS user, you will receive:
  713.  
  714.                    *  A subscription to The Prompt Solution, JP Software's
  715.                       publication for 4DOS users and other customers.  The
  716.                       Prompt Solution includes tips for using 4DOS,
  717.                       notification of upgrades, and information about 4DOS
  718.                       enhancements and other products from JP Software.
  719.  
  720.                    *  Technical support via electronic mail, fax, mail, or
  721.                       telephone.
  722.  
  723.                    *  A free or low-cost upgrade to the next version of 4DOS;
  724.                       see below for details.
  725.  
  726.  
  727.           ___________________________________________________________________
  728.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  5
  729.  
  730.                                                                  INTRODUCTION
  731.           ___________________________________________________________________
  732.  
  733.  
  734.               4DOS is upgraded regularly through maintenance releases,
  735.               designed to fix minor problems or improve compatibility, and
  736.               major upgrades which contain enhancements and additional
  737.               features.  Maintenance releases are identified by a change in
  738.               the hundredths digit of the version number, for example from
  739.               4.0 to 4.01 or 4.02.  New versions are identified by a change
  740.               in the tenths digit or "ones" digit, for example from 4.0 to
  741.               4.1 or 5.0.
  742.  
  743.               As a registered user you will automatically be notified when a
  744.               major upgrade of 4DOS is released.  The first major upgrade
  745.               released after your initial purchase of 4DOS can be obtained
  746.               at no charge if you download it from one of our support areas
  747.               (see below).  A new manual will be available for download from
  748.               the same sources.  If you do not have a modem or prefer to
  749.               obtain the new version on diskette, there is a minimal
  750.               processing charge; there is also a charge for a new printed
  751.               manual.  After you've received this first free or low-cost
  752.               upgrade, there will be a standard upgrade charge to get
  753.               additional major upgrades as they are released.
  754.  
  755.               We don't send out notices when maintenance releases become
  756.               available, because you don't usually need them unless you're
  757.               having a problem.  However, you can download maintenance
  758.               releases from our support areas (see below), or order them on
  759.               disk at a nominal cost.  If you call with a problem that's
  760.               been addressed in a maintenance release, we'll mail you a copy
  761.               on disk or assist you in downloading it.  Downloading a
  762.               maintenance release or obtaining it on disk from JP Software
  763.               is separate from and does not affect your eligibility for a
  764.               free or low-cost upgrade to the next major upgrade of 4DOS.
  765.  
  766.               As a registered user, you can download maintenance releases
  767.               and your free or low-cost 4DOS upgrade from the JP Software
  768.               support area on CompuServe (GO PCVENB, library 10), Bix
  769.               (ibm.vendors/listings), or Channel 1 (see below).  The file
  770.               name(s) used for 4DOS updates vary from time to time depending
  771.               on the extent of the changes made, but typically will look
  772.               like 4DOS4*.ZIP.  The "*" refers to one or more characters
  773.               further identifying the file.  Check the directory listings
  774.               and file descriptions on the service you are using to identify
  775.               the files you need.  Downloads are also available from many
  776.               other local bulletin boards and online services.  Lists of
  777.               download locations, including bulletin boards outside the USA,
  778.               are published from time to time in The Prompt Solution and are
  779.               included in the SUPPORT.BBS file that comes with 4DOS.
  780.  
  781.  
  782.  
  783.  
  784.           ___________________________________________________________________
  785.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  6
  786.  
  787.                                                                  INTRODUCTION
  788.           ___________________________________________________________________
  789.  
  790.  
  791.               We offer BBS support through Channel 1 in Boston, one of the
  792.               largest and best-run bulletin boards in the US.  Channel 1 is
  793.               an independent bulletin board and is not owned or operated by
  794.               JP Software.  To access Channel 1 set your modem to 2400 baud,
  795.               no parity, 8 data bits, and 1 stop bit, and dial 617-354-8873
  796.               (if you have a high-speed modem, additional numbers are
  797.               available once you are online).  Join conference 5 for 4DOS
  798.               downloads.  You can leave 4DOS support messages and download
  799.               4DOS files at no charge, but if you want to use any of Channel
  800.               1's other excellent services you may need to purchase a
  801.               membership to have sufficient online time.
  802.  
  803.  
  804.           Technical Support
  805.  
  806.               Technical support for 4DOS is available to all users.  When
  807.               you contact us for support please give us your 4DOS serial
  808.               number so that we can verify your status as a customer, keep
  809.               track of your inquiry properly, and contact you if necessary.
  810.  
  811.               Often the best way to contact us for support is by modem in
  812.               one of the following public 4DOS support conferences.  The
  813.               numbers in parentheses indicate the usual delay, in days, to
  814.               receive a reply to a message.
  815.  
  816.               CompuServe / ZiffNet:  Primary support is via the JP Software
  817.               section of the CompuServe PCVENB forum (GO PCVENB, section 10)
  818.               (1 day).  We monitor other CompuServe and ZiffNet forums, but
  819.               response may vary depending on our workload.
  820.  
  821.               Bulletin Boards:  Primary support is via the Channel 1 BBS,
  822.               Boston, MA (1 - 3 days; see above for access details).
  823.               Messages may be left in any of the 4DOS conferences; check the
  824.               online list for exact conference numbers, which may change.
  825.               Additional support is available from many local BBSes via the
  826.               4DOS conferences on the InterLink, RIME (PC Relay), SmartNet,
  827.               and FidoNet BBS Networks (3-5 days).
  828.  
  829.               BIX:  Support is available via the ibm.vendors conference,
  830.               topic 4DOS (3-5 days).
  831.  
  832.               In addition, you can contact JP Software for support by mail,
  833.               telephone, fax, or electronic mail.  Addresses and phone
  834.               numbers are listed on page vi of this manual.
  835.  
  836.               Our goal is to return all telephone messages within 24 hours
  837.               (weekends and holidays excluded).  If your problem is urgent
  838.               and requires a faster response, please let us know and we will
  839.  
  840.  
  841.           ___________________________________________________________________
  842.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  7
  843.  
  844.                                                                  INTRODUCTION
  845.           ___________________________________________________________________
  846.  
  847.  
  848.               try to accommodate you.  If you contact us by telephone and
  849.               don't receive a reply within 24 hours, please try again.  We
  850.               may have tried to return your call and been unable to reach
  851.               you.
  852.  
  853.               Before contacting us for support, please check if the manual
  854.               or other documentation answers your question.  If you can't
  855.               find what you need, try Chapter 4 / General Concepts (page
  856.               41), and the Index.  If you're having trouble getting 4DOS to
  857.               run properly, either alone or with your particular hardware or
  858.               software, see Chapter 7 / Using 4DOS with Your Hardware and
  859.               Software, on page 139, and the APPNOTES.DOC file on your 4DOS
  860.               disk.  Also look through the README.DOC and UPDATE.DOC files
  861.               that came with 4DOS, as they may contain updates to this
  862.               manual or other important information.
  863.  
  864.               If you do need to contact us for support, it helps if you can
  865.               give us some basic information:
  866.  
  867.                    *  What exactly did you do?  A concise description of what
  868.                       steps you must take to make the problem appear is much
  869.                       more useful than a long analysis of what might be
  870.                       happening.
  871.  
  872.                    *  What went wrong?  At what point did the failure occur?
  873.                       If you saw an error message or other important or
  874.                       unusual information on the screen, what exactly did it
  875.                       say?
  876.  
  877.                    *  Briefly, what techniques did you use to try to resolve
  878.                       the problem?  What results did you get?
  879.  
  880.                    *  What are the contents of your CONFIG.SYS, AUTOEXEC.BAT,
  881.                       4START, 4EXIT, and 4DOS.INI files, any batch files they
  882.                       call, and any alias or environment variable files they
  883.                       load?
  884.  
  885.                    *  Can you repeat the problem or does it occur randomly?
  886.                       If it's random, are there any clues as to what programs
  887.                       you're using when the problem occurs?
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.           ___________________________________________________________________
  899.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  8
  900.  
  901.                                                     CHAPTER 1 / 4DOS FEATURES
  902.           ___________________________________________________________________
  903.  
  904.  
  905.  
  906.           CHAPTER 1 / 4DOS FEATURES
  907.  
  908.  
  909.           4DOS is a complete computing environment that works with all
  910.           versions of MS-DOS and PC-DOS from 2.0 to 5; with DR-DOS 3.4, 5.0,
  911.           and above; and in the OS/2 DOS compatibility box.  It is compatible
  912.           with virtually all application programs, with Microsoft Windows,
  913.           and with task switching programs like DESQView and Back & Forth.
  914.  
  915.           4DOS replaces the traditional DOS user interface with a more
  916.           modern, friendlier, and more powerful one.  4DOS is completely
  917.           compatible with traditional DOS commands, and adds dozens of new
  918.           features that aren't available with any version of DOS.
  919.  
  920.  
  921.               Minimal Memory Usage
  922.  
  923.               4DOS can take advantage of extended memory, expanded memory,
  924.               and memory managers for 80286, 386, and 486 computers that let
  925.               programs "load high."  If you load both 4DOS and the
  926.               environment "high," 4DOS will use only 256 bytes of base
  927.               memory, less than any version of the traditional DOS command
  928.               processor, COMMAND.COM.  (See page 127.)
  929.  
  930.  
  931.               Online Help
  932.  
  933.               4DOS has complete, full-screen, context-sensitive help for all
  934.               of its commands and all DOS utilities.  The F1 key pops up the
  935.               help system at any time from the 4DOS prompt.  The help system
  936.               is cross-referenced and includes examples.  (See page 62.)
  937.  
  938.  
  939.               Directory Navigation
  940.  
  941.               4DOS's enhanced CD command lets you specify where to look for
  942.               subdirectories you're changing to.  CDD lets you switch drives
  943.               and directories simultaneously, and the new automatic
  944.               directory change feature changes directories for you when you
  945.               type a directory name at the command line.
  946.  
  947.  
  948.               Faster and Better Batch Files
  949.  
  950.               4DOS speeds up traditional DOS batch files, and introduces a
  951.               new kind of batch file processing that is 5 to 10 times faster
  952.               than traditional batch files as well.  (See page 99.)
  953.  
  954.  
  955.           ___________________________________________________________________
  956.           Copyright 1991, JP Software Inc.        4DOS Reference Manual  /  9
  957.  
  958.                                                     CHAPTER 1 / 4DOS FEATURES
  959.           ___________________________________________________________________
  960.  
  961.  
  962.               In addition, 4DOS has more than two dozen new batch file
  963.               commands, and many other enhancements that will make your
  964.               batch files easier to write and far more powerful.
  965.  
  966.  
  967.               Command Line Enhancements
  968.  
  969.               4DOS replaces the traditional command line with a much
  970.               friendlier and more powerful command line environment.  Among
  971.               the features which 4DOS offers are:
  972.  
  973.                    Command Line Editing:  You can use the cursor keys to
  974.                    make corrections, in the same way that you would with a
  975.                    text editor.   (See page 55.)
  976.  
  977.                    Command History and Recall:  4DOS keeps track of each
  978.                    command you type.  You can recall any command and issue
  979.                    it again, or edit it to create a slightly different
  980.                    command.   Commands can be recalled one at a time, or you
  981.                    can pop up a window of recently entered commands and
  982.                    choose the one you want.  (See page 56.)
  983.  
  984.                    Automatic Filename Expansion:  If you type part of a
  985.                    filename, with or without wildcards, 4DOS will fill in
  986.                    the complete filename for you at the touch of a key.
  987.                    (See page 59.)
  988.  
  989.                    Multiple Commands on a Single Line:  You can type a
  990.                    series of commands on a single line instead of waiting
  991.                    for each one to finish before you issue the next one.
  992.                    (See page 61.)
  993.  
  994.                    Multiple Filenames:  Most 4DOS commands can operate on
  995.                    multiple files at once.  For example, you can copy
  996.                    several files at once from your hard drive to drive A
  997.                    with a command like:
  998.  
  999.                         copy *.wks *.dat *.txt  a:\
  1000.  
  1001.                    Point-and-Shoot File Selection:  The SELECT command lets
  1002.                    you choose files with the cursor keys instead of
  1003.                    remembering their names.  It gives you a full "point-and-
  1004.                    shoot" environment for other 4DOS commands.   (See page
  1005.                    286.)
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.           ___________________________________________________________________
  1013.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  10
  1014.  
  1015.                                                     CHAPTER 1 / 4DOS FEATURES
  1016.           ___________________________________________________________________
  1017.  
  1018.  
  1019.               Aliases
  1020.  
  1021.               An alias is a command you create, assigned to a name you
  1022.               select or to a key combination of your choosing.  You can use
  1023.               aliases to rename commands, to set command defaults, and to
  1024.               create new commands that are a combination of other commands.
  1025.               When aliases are combined with the 4DOS multiple command
  1026.               feature, they act like very fast batch files.   (See pages 96
  1027.               and 169.)
  1028.  
  1029.  
  1030.               File Descriptions
  1031.  
  1032.               4DOS lets you assign a description (up to 40 characters long)
  1033.               to each of your files and directories.  The descriptions are
  1034.               displayed with the DIR and SELECT commands, and move with
  1035.               their files when you use a COPY, DEL, MOVE, or RENAME command.
  1036.               (See page 203.)
  1037.  
  1038.  
  1039.               Executable Extensions
  1040.  
  1041.               Executable extensions let you associate a file extension with
  1042.               the program that processes files of that type.  For example,
  1043.               you could associate .BAS files with the BASIC interpreter, or
  1044.               .DBF files with dBase or Foxbase.  4DOS runs the appropriate
  1045.               program automatically whenever you type the name of a file
  1046.               that has an extension you have defined as executable.  (See
  1047.               page 75.)
  1048.  
  1049.  
  1050.               Compatibility
  1051.  
  1052.               You can use 4DOS:
  1053.  
  1054.                    *  with all monochrome, CGA, EGA, and VGA video systems,
  1055.                       with any number of screen rows and columns.
  1056.  
  1057.                    *  with DOS-compatible networks, including Novell Netware,
  1058.                       3Com 3+, Banyan Vines, and Artisoft LANTastic.
  1059.  
  1060.                    *  with all popular memory managers and task switchers.
  1061.  
  1062.                    *  with virtually all commercial applications, utility
  1063.                       programs, and memory-resident utilities (TSRs).
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.           ___________________________________________________________________
  1070.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  11
  1071.  
  1072.                                                     CHAPTER 1 / 4DOS FEATURES
  1073.           ___________________________________________________________________
  1074.  
  1075.  
  1076.               New Commands and Options
  1077.  
  1078.               4DOS includes over 80 commands.  A few are the same as
  1079.               traditional commands.  Many are compatible with traditional
  1080.               commands but are enhanced with several additional options.
  1081.               The majority are unique to 4DOS.  If you have always wished
  1082.               that DOS had a command to help in a special situation, you
  1083.               will probably find that command in 4DOS.  A complete list of
  1084.               4DOS commands and options, along with explanations of how to
  1085.               use them, begins on page 162.
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.           ___________________________________________________________________
  1127.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  12
  1128.  
  1129.                                                      CHAPTER 2 / INSTALLATION
  1130.           ___________________________________________________________________
  1131.  
  1132.  
  1133.  
  1134.           CHAPTER 2 / INSTALLATION
  1135.  
  1136.  
  1137.           Before you install 4DOS (or any other software, for that matter),
  1138.           you should make a bootable system diskette so you can recover in
  1139.           case of a power failure or other interruption during the
  1140.           installation process.  To do so, put a fresh diskette in drive A
  1141.           and then type:
  1142.  
  1143.                    format a: /s
  1144.  
  1145.           The FORMAT command will take a few minutes to prepare the floppy
  1146.           diskette and then will copy your system files to drive A.  Once the
  1147.           process is complete, you should test your bootable floppy by
  1148.           leaving it in drive A and simultaneously pressing the Ctrl, Alt,
  1149.           and Del keys to make sure your system will boot up properly.  Once
  1150.           that's done, put the floppy away in a safe place and reboot your
  1151.           computer normally.
  1152.  
  1153.  
  1154.           Automated Installation
  1155.  
  1156.               Now you are ready to install 4DOS.  Put the distribution
  1157.               diskette into your first disk drive, drive A.  (You can use
  1158.               drive B if you prefer.)  Then log onto drive A by typing:
  1159.  
  1160.                    a:
  1161.  
  1162.               and press the Enter key.  One of the files on the distribution
  1163.               diskette, README.1ST, contains information that you should
  1164.               read before you install 4DOS on your computer.  Type:
  1165.  
  1166.                    type readme.1st
  1167.  
  1168.               to view the file.  If you want to print a copy of the file,
  1169.               type:
  1170.  
  1171.                    copy readme.1st prn
  1172.  
  1173.               Now you can start the installation process.  Type:
  1174.  
  1175.                    install
  1176.  
  1177.               and press the Enter key.  If you are using a color video
  1178.               adapter with a monochrome monitor (for example, a laptop
  1179.               computer with a monochrome EGA display), type:
  1180.  
  1181.  
  1182.  
  1183.           ___________________________________________________________________
  1184.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  13
  1185.  
  1186.                                                      CHAPTER 2 / INSTALLATION
  1187.           ___________________________________________________________________
  1188.  
  1189.  
  1190.                    install /m
  1191.  
  1192.               Once the installation program has started, just follow the
  1193.               instructions on the screen and 4DOS will install itself on
  1194.               your system.
  1195.  
  1196.               The installation program will ask whether you want to perform
  1197.               a complete installation, a partial installation in order to
  1198.               run the 4DOS Tour, or whether you want to retrieve specific
  1199.               files from the 4DOS library.  Choose the full installation to
  1200.               put all of 4DOS on your system, or the Tour option if you want
  1201.               to see what 4DOS can do before you install it permanently.
  1202.               The installation program will not make any changes to your
  1203.               CONFIG.SYS or AUTOEXEC.BAT files unless you give it permission
  1204.               to do so.
  1205.  
  1206.               If you elect to perform a full installation, reboot your
  1207.               computer when the installation program is done.  You will then
  1208.               have all the power of 4DOS available to you.
  1209.  
  1210.               We know some users feel unsure about running automated
  1211.               installation programs on their computers.  4DOS's automated
  1212.               installation is carefully written to be very well-behaved.  It
  1213.               won't modify or erase any existing files without asking you,
  1214.               and it takes a very straightforward, step by step approach.
  1215.  
  1216.               You can halt the installation process at any time and return
  1217.               to the DOS prompt by pressing Ctrl-X (hold down the Ctrl key
  1218.               and then press "X").
  1219.  
  1220.  
  1221.           ## Manual Installation
  1222.  
  1223.               The 4DOS files are contained in a special library file on the
  1224.               distribution diskette.  You cannot simply copy files from the
  1225.               diskette onto your system.  You must use the installation
  1226.               program to extract and decompress the 4DOS files if you want
  1227.               to perform a manual installation, or if you need to replace a
  1228.               damaged 4DOS file on your hard disk.
  1229.  
  1230.               If you want to install 4DOS manually, first start the
  1231.               automatic installation program using the instructions above.
  1232.               Select the Extract all files option and extract the 4DOS files
  1233.               onto your hard disk or another floppy disk.  On a hard disk,
  1234.               place the files in their own directory.  If you are upgrading
  1235.               from a previous version of 4DOS, use a new directory -- don't
  1236.               overwrite your existing files.
  1237.  
  1238.  
  1239.  
  1240.           ___________________________________________________________________
  1241.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  14
  1242.  
  1243.                                                      CHAPTER 2 / INSTALLATION
  1244.           ___________________________________________________________________
  1245.  
  1246.  
  1247.               Once you've extracted the files, you can go through the 4DOS
  1248.               Tour (see page 18) if you want to try 4DOS before completing
  1249.               the installation.  When you're ready to finish the
  1250.               installation process, all you need to do is add one line to
  1251.               your CONFIG.SYS file (before modifying CONFIG.SYS, be sure you
  1252.               have a bootable floppy disk as discussed above):
  1253.  
  1254.                    SHELL=D:\PATH\4DOS.COM D:\PATH /P
  1255.  
  1256.               "d:\path" means the drive and directory where your 4DOS files
  1257.               are stored.  The second "d:\path" on the SHELL= line sets the
  1258.               COMSPEC environment variable, and can be left out if 4DOS.COM
  1259.               is in the root directory of your boot drive.  Be sure to
  1260.               delete or REMark out any old SHELL= line for COMMAND.COM after
  1261.               you add the new SHELL= line for 4DOS.
  1262.  
  1263.               Next, add the following line to your AUTOEXEC.BAT file:
  1264.  
  1265.                    D:\PATH\KSTACK.COM
  1266.  
  1267.               where "d:\path" is the drive and directory where your 4DOS
  1268.               files are stored.
  1269.  
  1270.               Once you've finished modifying CONFIG.SYS and AUTOEXEC.BAT,
  1271.               reboot your system to start 4DOS.  For details on setting up
  1272.               the SHELL= line and AUTOEXEC.BAT, and on the 4DOS.INI file,
  1273.               which controls 4DOS configuration, see Chapter 6 / Options and
  1274.               Tuning (page 109).
  1275.  
  1276.  
  1277.           ## Uninstalling 4DOS
  1278.  
  1279.               In the extremely unlikely event that you have trouble booting
  1280.               your computer after you install 4DOS, you can also remove it
  1281.               quite easily.  We don't expect you to have any trouble, but we
  1282.               know some people feel more comfortable knowing how to
  1283.               uninstall a product as well as install it.  Or, you may need
  1284.               to remove 4DOS from one system if you are moving it to another
  1285.               system.
  1286.  
  1287.               To temporarily remove 4DOS from your system, first find the
  1288.               location of COMMAND.COM on your disk (for example, in the root
  1289.               directory, or the DOS directory).  Boot the system and use any
  1290.               standard editor to edit your CONFIG.SYS file (before modifying
  1291.               CONFIG.SYS be sure you have a bootable floppy disk as
  1292.               discussed above).  Look for a line which begins:
  1293.  
  1294.                    SHELL=D:\PATH\4DOS.COM ...
  1295.  
  1296.  
  1297.           ___________________________________________________________________
  1298.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  15
  1299.  
  1300.                                                      CHAPTER 2 / INSTALLATION
  1301.           ___________________________________________________________________
  1302.  
  1303.  
  1304.               ("d:\path" means a drive letter and directory name).  Insert
  1305.               the characters "REM " at the beginning of this line.  This
  1306.               converts it into "remarks" or comments.  (If you are using DOS
  1307.               3 or below, REMarks are not recognized in CONFIG.SYS, so the
  1308.               changed lines will produce a harmless "Unrecognized command"
  1309.               error when the system boots.)  Next, add a new line like this:
  1310.  
  1311.                    SHELL=D:\PATH\COMMAND.COM /P
  1312.  
  1313.               where "d:\path" is the proper drive and directory for
  1314.               COMMAND.COM.  If you were previously running COMMAND.COM with
  1315.               a /E:nnnn switch to set the size of your environment, you can
  1316.               add it to this line as well.
  1317.  
  1318.               After CONFIG.SYS has been modified, edit your AUTOEXEC.BAT
  1319.               file to remove any changes made to accommodate 4DOS.  Look for
  1320.               two commands:
  1321.  
  1322.                    SET COMSPEC=D:\PATH\4DOS.COM
  1323.                    D:\PATH\KSTACK.COM
  1324.  
  1325.               The first command will not be present on most systems.  If
  1326.               it's there, change it to read:
  1327.  
  1328.                    SET COMSPEC=D:\PATH\COMMAND.COM
  1329.  
  1330.               where "d:\path" is replaced by the correct drive and directory
  1331.               for COMMAND.COM.  The second command can be deleted, or you
  1332.               can place "REM " in front of it to convert it to a comment.
  1333.               The second command may be present without the "d:\path"
  1334.               portion or the ".COM" portion; the key thing to look for is
  1335.               "KSTACK".  If you wish, you can look for the PATH command, and
  1336.               remove the 4DOS directory from the directories listed there.
  1337.               However, there's probably no reason to do so unless you're
  1338.               permanently removing 4DOS from your system.
  1339.  
  1340.               Now reboot your system, and you should be back up and running
  1341.               under COMMAND.COM.  Correct the problem that gave you trouble
  1342.               with 4DOS (contact our technical support department if you
  1343.               need help, see page 7).  Once the problem is fixed, edit your
  1344.               CONFIG.SYS file again to remove the REMs on your 4DOS lines
  1345.               and put one on your COMMAND.COM line instead, restore any
  1346.               COMSPEC command in AUTOEXEC.BAT, and you can boot with 4DOS
  1347.               again.
  1348.  
  1349.               To completely remove 4DOS from your system, change CONFIG.SYS
  1350.               and AUTOEXEC.BAT as described above, then delete your 4DOS
  1351.               files.
  1352.  
  1353.  
  1354.           ___________________________________________________________________
  1355.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  16
  1356.  
  1357.                                                      CHAPTER 2 / INSTALLATION
  1358.           ___________________________________________________________________
  1359.  
  1360.  
  1361.               Again, we don't expect you to need to use the procedure above
  1362.               -- but we thought you should have it anyway, just in case it
  1363.               makes you feel a little more at ease about installing a new
  1364.               product on your computer.
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.           ___________________________________________________________________
  1412.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  17
  1413.  
  1414.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1415.           ___________________________________________________________________
  1416.  
  1417.  
  1418.  
  1419.           CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1420.  
  1421.  
  1422.           This chapter will acquaint you with some of the features of 4DOS.
  1423.           It isn't a substitute for the rest of the manual, but it will help
  1424.           you understand how familiar 4DOS seems if you are used to working
  1425.           at the traditional command prompt.  At the same time, it will
  1426.           introduce you to many of 4DOS's most popular features and
  1427.           enhancements.  By the time you finish working through this chapter,
  1428.           you will have a feeling for how easy and friendly 4DOS is compared
  1429.           to the traditional DOS command processor.
  1430.  
  1431.           This tour is designed to be used interactively.  Sit down at your
  1432.           computer with the manual.  Each time an example is shown, try it.
  1433.           The tour will create all of the files it uses;  it won't modify or
  1434.           change your existing files and subdirectories at all.  Each section
  1435.           of the tour is self-contained so you can skip any sections you wish
  1436.           and return to them later.
  1437.  
  1438.           If you come across terms or concepts in this chapter that you are
  1439.           unsure about, refer to Chapter 4 / General Concepts, the Glossary
  1440.           on page 342, or the Index.
  1441.  
  1442.  
  1443.           Starting The Tour
  1444.  
  1445.               Before you can start the tour, you need to install 4DOS.  If
  1446.               you haven't done so yet, see page 13 for instructions.  Select
  1447.               "Tour Installation" from the INSTALL menu to copy the
  1448.               necessary 4DOS files to your disk without making any
  1449.               modifications to your CONFIG.SYS or AUTOEXEC.BAT files.  If
  1450.               you have already done a full installation and 4DOS is running
  1451.               on your system, just skip the step below that actually starts
  1452.               4DOS (the step where the command "4DOS" is entered).
  1453.  
  1454.               During the course of the tour, we'll ask you to enter several
  1455.               commands.  The text that you should enter is always shown in
  1456.               bold type.  Your entries are shown here in lower case, but you
  1457.               can type in either upper or lower case.
  1458.  
  1459.               The computer's prompts and responses are displayed in normal,
  1460.               non-bold type.  The display may look slightly different on
  1461.               your system, depending on how your prompt is set up, what disk
  1462.               drive you're using, and what files are in your 4DOS directory.
  1463.               Don't worry about any minor differences.
  1464.  
  1465.  
  1466.  
  1467.  
  1468.           ___________________________________________________________________
  1469.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  18
  1470.  
  1471.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1472.           ___________________________________________________________________
  1473.  
  1474.  
  1475.               In some cases, the computer's output will be too long to fit
  1476.               on a line of this manual and remain readable.  We've truncated
  1477.               those lines and placed three dots [...] at the end to show you
  1478.               that the actual line displayed on your screen will be a little
  1479.               longer.  Some commands create more lines of output than we
  1480.               need to display here to show how they work.  We've put a line
  1481.               of nine dots [... ... ...] in those locations to indicate that
  1482.               additional information will be shown on your screen.
  1483.  
  1484.               To start the tour, first change to the directory where 4DOS
  1485.               was installed, using the CD command.  For example, if you've
  1486.               installed 4DOS in the directory C:\4DOS, enter the following
  1487.               command:
  1488.  
  1489.                    C:\> cd 4dos
  1490.                    C:\4DOS>
  1491.  
  1492.               Now start 4DOS by typing:
  1493.  
  1494.                    C:\4DOS> 4dos
  1495.  
  1496.               You'll see a sign-on message from 4DOS that looks similar to
  1497.               this:
  1498.  
  1499.                    4DOS EMS swapping initialized (96K)
  1500.                    4DOS 4.0   DOS 5.0
  1501.                    Copyright 1988-1991  Rex Conn & JP Software Inc.  ...
  1502.                    Registered for use on a single computer.
  1503.  
  1504.               and then a prompt like this:
  1505.  
  1506.                    c:\4dos>
  1507.  
  1508.               Depending on how your prompt was previously defined, you may
  1509.               see the 4DOS prompt in lower case, which many people find
  1510.               easier to read.  A lower case prompt is the 4DOS default, and
  1511.               we'll show the prompt that way throughout the tour.  Once you
  1512.               have 4DOS installed you can use the PROMPT command (see page
  1513.               271) to change the prompt to upper case if you prefer.
  1514.  
  1515.               If you want to exit from 4DOS at any time, just type the
  1516.               command EXIT at the 4DOS prompt and press Enter.  This will
  1517.               return you to the traditional DOS command line:
  1518.  
  1519.                    c:\4dos> exit
  1520.                    C:\4DOS>
  1521.  
  1522.  
  1523.  
  1524.  
  1525.           ___________________________________________________________________
  1526.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  19
  1527.  
  1528.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1529.           ___________________________________________________________________
  1530.  
  1531.  
  1532.           Basic Commands
  1533.  
  1534.               We'll begin the tour by demonstrating some of the most common,
  1535.               and most familiar, 4DOS commands.  We'll also show you some of
  1536.               the enhancements that 4DOS has added to those commands to make
  1537.               your computing easier.
  1538.  
  1539.               First, enter the single-character command ?.  You'll see a
  1540.               display like this:
  1541.  
  1542.                    c:\4dos> ?
  1543.                    ?           ALIAS       ATTRIB      BEEP        ...
  1544.                    CANCEL      CD          CDD         CHCP        ...
  1545.                    COLOR       COPY        CTTY        DATE        ...
  1546.                    DESCRIBE    DIR         DIRS        DRAWBOX     ...
  1547.                     ... ... ...
  1548.                    UNALIAS     UNSET       VER         VERIFY      ...
  1549.                    Y
  1550.  
  1551.               The ? command displays a list of all of 4DOS's commands.  You
  1552.               certainly don't have to memorize them all -- we'll show you
  1553.               how to get help with any command in a few moments.  Nor are we
  1554.               going to demonstrate all of these commands in this tour.  If
  1555.               you want complete information about a command, turn to the
  1556.               alphabetic Command Reference that begins on page 162.
  1557.  
  1558.               Now try a DIR command to see a list of files in the current
  1559.               directory.  DIR displays a list of file names, sizes, dates,
  1560.               and times:
  1561.  
  1562.                    c:\4dos> dir
  1563.  
  1564.                     Volume in drive C is JPS_TEST    Serial number is ...
  1565.                     Directory of  c:\4dos\*.*
  1566.  
  1567.                    .            <DIR>      8-22-91  14:21
  1568.                    ..           <DIR>      8-22-91  14:21
  1569.                    4dos.com        99280   8-26-91   4:00
  1570.                    4dos.doc       345005   8-26-91   4:00
  1571.                    4dos.ico          766   8-26-91   4:00
  1572.                    4dos.pif          545   8-26-91   4:00
  1573.                     ... ... ...
  1574.                    tour2.btm        2765   8-26-91   4:00
  1575.                    update40.doc    37946   8-26-91   4:00
  1576.                    vendor.doc       4434   8-26-91   4:00
  1577.                         833,056 bytes in 21 file(s)  851,968 bytes allocated
  1578.                      18,651,136 bytes free
  1579.  
  1580.  
  1581.  
  1582.           ___________________________________________________________________
  1583.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  20
  1584.  
  1585.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1586.           ___________________________________________________________________
  1587.  
  1588.  
  1589.               The 4DOS DIR display should look familiar.  But, unlike the
  1590.               traditional DIR display, 4DOS shows file names in lower case
  1591.               and in alphabetical order.  4DOS also gives you some totals at
  1592.               the end of the display that help you see how much space your
  1593.               files are using.
  1594.  
  1595.               By using some of DIR's options, you can make the display
  1596.               easier to read.  The directory display you just saw probably
  1597.               didn't fit on your screen.  You can tell DIR to pause at the
  1598.               end of each page by using the command DIR /P.  The /P is an
  1599.               example of a switch or option which modifies the behavior of a
  1600.               command:
  1601.  
  1602.                    c:\4dos> dir /p
  1603.  
  1604.                     Volume in drive C is JPS_TEST    Serial number is ...
  1605.                     Directory of  c:\4dos\*.*
  1606.  
  1607.                    .            <DIR>      8-22-91  14:21
  1608.                    ..           <DIR>      8-22-91  14:21
  1609.                    4dos.com        99280   8-26-91   4:00
  1610.                    4dos.doc       345005   8-26-91   4:00
  1611.                    4dos.ico          766   8-26-91   4:00
  1612.                    4dos.pif          545   8-26-91   4:00
  1613.                     ... ... ...
  1614.                    tour2.btm        2765   8-26-91   4:00
  1615.                    update40.doc    37946   8-26-91   4:00
  1616.                    Press any key when ready...
  1617.                    vendor.doc       4434   8-26-91   4:00
  1618.                         833,056 bytes in 21 file(s)  851,968 bytes allocated
  1619.                      18,649,088 bytes free
  1620.  
  1621.               You might prefer to display directories in 2 columns.  DIR
  1622.               will do that if you include the /2 option.  If you add the /V
  1623.               option, it will perform a vertical sort, with file names
  1624.               running alphabetically down the first column and then down the
  1625.               second column.  (We've left off the end of the second column
  1626.               of the display, since it doesn't fit on a manual page.  You'll
  1627.               be able to see it on the screen.)
  1628.  
  1629.                    c:\4dos> dir /2/v
  1630.  
  1631.                     Volume in drive C is JPS_TEST    Serial number is ...
  1632.                     Directory of  c:\4dos\*.*
  1633.  
  1634.                    .            <DIR>      8-22-91  14:21   helpcfg.exe  ...
  1635.                    ..           <DIR>      8-22-91  14:21   kstack.com   ...
  1636.                    4dos.com        99280   8-26-91   4:00   order.frm    ...
  1637.  
  1638.  
  1639.           ___________________________________________________________________
  1640.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  21
  1641.  
  1642.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1643.           ___________________________________________________________________
  1644.  
  1645.  
  1646.                    4dos.doc       345005   8-26-91   4:00   readme.doc   ...
  1647.                    4dos.ico          766   8-26-91   4:00   support.bbs  ...
  1648.                    4dos.pif          545   8-26-91   4:00   sysop.doc    ...
  1649.                    4dosm.ico         766   8-26-91   4:00   tour1.btm    ...
  1650.                    4help.exe       45632   8-26-91   4:00   tour2.btm    ...
  1651.                    aliases          8164   8-26-91   4:00   update40.doc ...
  1652.                    appnotes.doc    82722   8-26-91   4:00   vendor.doc   ...
  1653.                    4dos.hlp       120555   8-26-91   4:00
  1654.                         833,056 bytes in 21 file(s)  851,968 bytes allocated
  1655.                      18,653,184 bytes free
  1656.  
  1657.               DIR has many other formatting and file selection options.
  1658.               You'll use a few below; all of them are explained with the DIR
  1659.               command on page 204.
  1660.  
  1661.               Next, you'll use a simple batch file called TOUR1.BTM to
  1662.               create a dummy file.  (A .BTM batch file is similar to a
  1663.               traditional .BAT batch file but faster.  See page 99 for an
  1664.               explanation of the differences between the two.)  To run
  1665.               TOUR1.BTM, enter the command:
  1666.  
  1667.                    c:\4dos> tour1
  1668.  
  1669.               This batch file creates a small file called FILE1 in your
  1670.               current directory.  The contents of the file aren't important;
  1671.               we're simply using it to demonstrate some of 4DOS's file-
  1672.               handling capabilities.  You can verify that FILE1 has been
  1673.               created by using DIR again.
  1674.  
  1675.               Now use the COPY command to copy the contents of FILE1 to a
  1676.               new file, FILE2:
  1677.  
  1678.                    c:\4dos> copy file1 file2
  1679.                    c:\4dos\file1 => c:\4dos\file2
  1680.                         1 file(s) copied
  1681.  
  1682.               4DOS performed the copy just like the traditional COPY command
  1683.               does.  You may notice that the output is a little friendlier:
  1684.               COPY tells you exactly what file it copied and where it copied
  1685.               the file to, along with a count of files at the end.
  1686.  
  1687.               Now try renaming a file.  If you've used the traditional
  1688.               RENAME command or its synonym REN, this will look familiar:
  1689.  
  1690.                    c:\4dos> ren file1 file3
  1691.                    c:\4dos\file1 -> c:\4dos\file3
  1692.                         1 file(s) renamed
  1693.  
  1694.  
  1695.  
  1696.           ___________________________________________________________________
  1697.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  22
  1698.  
  1699.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1700.           ___________________________________________________________________
  1701.  
  1702.  
  1703.               Like COPY, the 4DOS REN command tells you just what it did.
  1704.               You now have two files, FILE2 and FILE3, in the current
  1705.               directory.  You can use one of 4DOS's enhancements to add the
  1706.               extension .TST to both of them:
  1707.  
  1708.                    c:\4dos> ren file2 file3 *.tst
  1709.                    c:\4dos\file2 -> c:\4dos\file2.tst
  1710.                    c:\4dos\file3 -> c:\4dos\file3.tst
  1711.                         2 file(s) renamed
  1712.  
  1713.               Unlike the traditional REN command, 4DOS lets you rename
  1714.               multiple files with a single command.  All of the 4DOS file
  1715.               processing commands like COPY, DEL, MOVE, and RENAME accept
  1716.               multiple file names, so you can do in one command what used to
  1717.               require a separate command for each file.
  1718.  
  1719.               Now delete the files you have just created.  You could use a
  1720.               simple command like DEL *.TST, but that would delete any other
  1721.               .TST files in the current directory also.  To protect against
  1722.               erasing files that you might want to keep, add a /P option to
  1723.               DEL so that it will prompt you before it deletes each file.
  1724.               Answer Y to the prompts shown below to let 4DOS delete your
  1725.               test files:
  1726.  
  1727.                    c:\4dos> del *.tst /p
  1728.                    Delete c:\4dos\file3.tst (Y/N)? y
  1729.                    Delete c:\4dos\file2.tst (Y/N)? y
  1730.                         2 file(s) deleted
  1731.  
  1732.               To verify all these actions, you can do a DIR or DIR /P to
  1733.               look at what files are left in the directory.  All the files
  1734.               you've just created (FILE1, FILE2, FILE3, etc.) should be
  1735.               gone.
  1736.  
  1737.               The features we've demonstrated here -- traditional commands
  1738.               with enhancements that make your work easier -- are present
  1739.               throughout 4DOS.  If you want more details, pick a DOS command
  1740.               that you're familiar with and look up the corresponding 4DOS
  1741.               command in the reference section to get an idea of what's new
  1742.               and improved in 4DOS.  (Remember that 4DOS only replaces
  1743.               internal commands like COPY and DIR, not external commands
  1744.               like DISKCOPY and FORMAT.)
  1745.  
  1746.  
  1747.  
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.           ___________________________________________________________________
  1754.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  23
  1755.  
  1756.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1757.           ___________________________________________________________________
  1758.  
  1759.  
  1760.           Command Line Editing and History
  1761.  
  1762.               This section demonstrates 4DOS features which make it easy to
  1763.               correct typing mistakes at the DOS prompt, to repeat previous
  1764.               commands, and to get help with any command.
  1765.  
  1766.               We can't show you exact examples here as easily as we can in
  1767.               the other sections of the tour, since the display depends on
  1768.               the exact keystrokes you type and we want you to experiment a
  1769.               little.  So we'll guide you through what 4DOS can do, and
  1770.               you'll see the results on your screen.
  1771.  
  1772.               First, create a typing error by mistake.  Enter an incorrect
  1773.               DIR command:
  1774.  
  1775.                    c:\4dos> dur /2
  1776.  
  1777.               Traditionally, you would have had to use the Backspace key to
  1778.               erase most of the line in order to correct this error, or
  1779.               press Esc and start over.  4DOS makes corrections much easier.
  1780.               Press the Home key followed by the right arrow.  The cursor
  1781.               will move to the start of the line and then right one space to
  1782.               the "u" in "dur".  Type an "i" and the command should be
  1783.               correct.  To execute it, press Enter;  if you'd rather not,
  1784.               press Esc.
  1785.  
  1786.               That's a simple example of 4DOS's command line editing.  You
  1787.               can use the left and right arrow keys, Home and End, and
  1788.               Backspace and Del to move around and modify your command line
  1789.               at any time, just like you do in your word processor or
  1790.               editor.  Other keys let you move the cursor a word at a time,
  1791.               delete words, change between overstrike and insert modes, and
  1792.               perform many other operations.  Esc always clears the line and
  1793.               lets you start over.  For a summary of all the command line
  1794.               editing keys see page 55, or your 4DOS Quick Reference card.
  1795.  
  1796.               4DOS also remembers the commands you type in a command
  1797.               history.  To see the commands you have used so far during this
  1798.               tour, we'll use the 4DOS HISTORY command to display the entire
  1799.               history list:
  1800.  
  1801.                    c:\4dos> history
  1802.                    ?
  1803.                    dir
  1804.                    dir /p
  1805.                    dir /2/v
  1806.                    tour1
  1807.                    ren file1 file3
  1808.  
  1809.  
  1810.           ___________________________________________________________________
  1811.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  24
  1812.  
  1813.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1814.           ___________________________________________________________________
  1815.  
  1816.  
  1817.                    ren file2 file3 *.tst
  1818.                    del *.tst /p
  1819.                    dir /2
  1820.  
  1821.               4DOS records about 1000 characters of history.  You can reduce
  1822.               or enlarge this amount to suit your own needs.
  1823.  
  1824.               Now press the up-arrow key once.  The last command in the
  1825.               HISTORY display (DIR /2 in the example above) will appear at
  1826.               the prompt.  You can use the editing keys to modify this
  1827.               command, which is much easier than retyping it.  To execute
  1828.               the command again, in either its modified or unmodified form,
  1829.               press Enter.  To clear the line, press Esc.
  1830.  
  1831.               If you'd like to see more commands, first press Esc to clear
  1832.               the command line. (To see all commands in the history, you
  1833.               should always start with an empty command line.)  Now press
  1834.               up-arrow several times.  Each time you press it, 4DOS will
  1835.               back up one more line in the command history.  Once you find
  1836.               the line you're looking for, you can modify it if you like and
  1837.               then press Enter to execute it.
  1838.  
  1839.               Now imagine that you have been working for a while.  An hour
  1840.               ago you did a complex DIR command and you need to do it again.
  1841.               You could scroll through an hour's worth of command history.
  1842.               But another 4DOS feature called command completion will save
  1843.               you time.
  1844.  
  1845.               First, type the beginning of the command -- DI, or DIR.  Now
  1846.               press the up-arrow.  4DOS will recall the newest command in
  1847.               the history that starts with the characters you typed (if
  1848.               there are no matches, 4DOS beeps).  Press up-arrow again to
  1849.               retrieve the command before that, still matching to the
  1850.               characters you originally typed.
  1851.  
  1852.               You can test this out easily using DI or DIR, because you've
  1853.               put several DIR commands into the command history during the
  1854.               tour.
  1855.  
  1856.               Perhaps you would prefer to look at a list of commands that
  1857.               you have entered and choose from the list.  First press the
  1858.               Esc key to clear the command prompt.  Then press the PgUp key.
  1859.               4DOS will display a history window in the upper right corner
  1860.               of your screen showing the commands you've recently typed.
  1861.               You can move around in this window with the up-arrow and down-
  1862.               arrow keys.  PgUp and PgDn move the display a page at a time.
  1863.               When you find the command you want, press Enter to re-execute
  1864.  
  1865.  
  1866.  
  1867.           ___________________________________________________________________
  1868.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  25
  1869.  
  1870.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1871.           ___________________________________________________________________
  1872.  
  1873.  
  1874.               it as is, or press any other key to move the line down to the
  1875.               prompt where you can edit it as usual.
  1876.  
  1877.               You can find more information on command line editing and
  1878.               history beginning on pages 55 and 56.  And you can use
  1879.               directives in your 4DOS.INI file (see page 118) to set the
  1880.               length of the history list and the size of the history window,
  1881.               and to redefine the editing and history keys.
  1882.  
  1883.               You can also get help any time you need it from the 4DOS
  1884.               command prompt.  Just press the F1 key.  You'll see a display
  1885.               of all of 4DOS's HELP topics.  If you would like some help
  1886.               with COPY, move the cursor bar to COPY, or just type COPY and
  1887.               4DOS will move the bar for you.  Press Enter to see help on
  1888.               the topic;  once you're there, scroll through the help using
  1889.               the vertical arrows or PgUp and PgDn keys.  The highlighted
  1890.               items within a topic are cross-references to other topics;
  1891.               select one with the horizontal arrow keys and press Enter to
  1892.               view it.  Press Esc or F1 to return to the topic list.
  1893.  
  1894.               For more help using the Help display, select the topic -HELP-
  1895.               from the topic list.  If you have a mouse, see the -MOUSE-
  1896.               topic for information on using the mouse within the Help
  1897.               system.
  1898.  
  1899.               Now exit the help system (use Esc) and start entering a
  1900.               command:
  1901.  
  1902.                    c:\4dos> copy *.doc a: /
  1903.  
  1904.               After that "/" you want to use the option that tells COPY to
  1905.               prompt you before replacing an existing file, but you can't
  1906.               remember what it is.  Just leave the command as it is and
  1907.               press F1.  4DOS will display help on the command you're
  1908.               entering, and you'll see that the option you want is /R.
  1909.               Press Esc to exit help and you'll be right back on the command
  1910.               line.  You can type the R and press Enter to execute your
  1911.               command, or press Esc instead to clear the line if you don't
  1912.               really want to execute the command.
  1913.  
  1914.               4DOS has may more features that can help you at the command
  1915.               line.  Most of them are described in Chapter 5 / Using 4DOS,
  1916.               in the section At the Command Line starting on page 54.
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.           ___________________________________________________________________
  1925.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  26
  1926.  
  1927.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1928.           ___________________________________________________________________
  1929.  
  1930.  
  1931.           More About Files
  1932.  
  1933.               This section of the tour lets you explore some more of 4DOS's
  1934.               features that will help you manage files and directories.
  1935.               You're about to use another batch file to create some files
  1936.               with which you can experiment.  The batch file you'll use is
  1937.               called TOUR2.BTM.  First, take a look at the batch file with
  1938.               the 4DOS LIST command:
  1939.  
  1940.                    c:\4dos> list tour2.btm
  1941.  
  1942.               As you can see on your screen, LIST is a full screen file
  1943.               viewer.  You can scroll and page through the text.  You may
  1944.               notice that some lines near the end of the file extend beyond
  1945.               the edge of your screen.  To make the off-screen text visible
  1946.               use the left and right arrows to scroll the display
  1947.               horizontally, or press W to turn line wrapping on and off.
  1948.               LIST also lets you search for text and print the file you're
  1949.               viewing, two capabilities that we won't demonstrate on this
  1950.               tour.  The file TOUR2.BTM is simply a batch file that creates
  1951.               other files, using 4DOS's ECHO command.  You don't have to
  1952.               worry about how it works; we just used it to show you LIST.
  1953.  
  1954.               Now run TOUR2.BTM:
  1955.  
  1956.                    c:\4dos> tour2
  1957.  
  1958.                    Please wait ...
  1959.  
  1960.                    File creation completed
  1961.  
  1962.               TOUR2 creates three files called FILE1, FILE2, and FILE3.  The
  1963.               contents of the files aren't important since we're just using
  1964.               them for demonstration purposes.  You'll be deleting and
  1965.               recreating them several times through the rest of the tour.
  1966.  
  1967.               Now try 4DOS's SELECT feature.  SELECT lets you choose files
  1968.               for any 4DOS command from a full-screen list.  We'll use it
  1969.               here to delete one of the files that TOUR2 created.  Enter the
  1970.               command:
  1971.  
  1972.                    c:\4dos> select del (file*)
  1973.  
  1974.               This command tells 4DOS to let you select from files that
  1975.               begin with the characters "file", and then pass the name of
  1976.               each file you select to the DEL command for action.
  1977.  
  1978.  
  1979.  
  1980.  
  1981.           ___________________________________________________________________
  1982.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  27
  1983.  
  1984.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  1985.           ___________________________________________________________________
  1986.  
  1987.  
  1988.               The display on your screen should include a two-line header
  1989.               and then the list of files, just as they'd look in a directory
  1990.               display.  Press the spacebar to "mark" the first file -- a
  1991.               triangular mark will appear to the left of the file name.  You
  1992.               can scroll around in the display and mark and unmark files
  1993.               with the spacebar as you like.  When you hit Enter, the
  1994.               command will be executed, deleting the files you've marked.
  1995.               For now, mark FILE1 and leave the other files unmarked, so
  1996.               that FILE2 and FILE3 are not deleted.  You'll use them in the
  1997.               next step.
  1998.  
  1999.               SELECT is also handy if you want to copy a group of files to a
  2000.               floppy disk, perhaps to take your work home for the night or
  2001.               to make a quick backup.  If you'd like to try it, put a blank,
  2002.               formatted floppy disk in drive A.  Then enter this command:
  2003.  
  2004.                    c:\4dos> select copy (file*) a:
  2005.  
  2006.               Mark one or both of the files in the SELECT display, and the
  2007.               marked file(s) will be copied to the floppy disk when you hit
  2008.               Enter.
  2009.  
  2010.               SELECT is a "prefix" command:  it goes before another command
  2011.               and modifies what that second command does.  Another useful
  2012.               prefix command is EXCEPT,  which lets you do something except
  2013.               to one or more files.  Before you try EXCEPT, create new
  2014.               copies of FILE1, FILE2, and FILE3 (TOUR2 will overwrite any
  2015.               old copies of these files remaining from the last time it was
  2016.               run):
  2017.  
  2018.                    c:\4dos> tour2
  2019.  
  2020.                    Please wait ...
  2021.  
  2022.                    File creation completed
  2023.  
  2024.               Now use EXCEPT to delete all but one of the files that TOUR2
  2025.               created:
  2026.  
  2027.                    c:\4dos> except (file1) del file*
  2028.                    Deleting c:\4dos\file2
  2029.                    Deleting c:\4dos\file3
  2030.                         2 file(s) deleted
  2031.  
  2032.               The EXCEPT command protected FILE1 from being deleted.  To
  2033.               verify that, use the DIR command.  When you're done, run TOUR2
  2034.               one more time so the files are there for the next step.
  2035.  
  2036.  
  2037.  
  2038.           ___________________________________________________________________
  2039.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  28
  2040.  
  2041.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2042.           ___________________________________________________________________
  2043.  
  2044.  
  2045.               Next, create two subdirectories within the current directory:
  2046.  
  2047.                    c:\4dos> md dira dirb
  2048.  
  2049.               Notice that you can create both subdirectories with a single
  2050.               command.  Traditionally, you would have needed two MD commands
  2051.               to do the same thing.  To verify that the directories are
  2052.               there, use DIR but ask it to display only subdirectories and
  2053.               not files (if you're curious, /A:D stands for "Attributes:
  2054.               Directory";  see page 204 for more details):
  2055.  
  2056.                    c:\4dos> dir /a:d
  2057.  
  2058.                     Volume in drive C is JPS_TEST  Serial number is ...
  2059.                     Directory of  c:\4dos\*.*
  2060.  
  2061.                    .            <DIR>      8-22-91  14:21
  2062.                    ..           <DIR>      8-22-91  14:21
  2063.                    DIRA         <DIR>      8-27-91  10:23
  2064.                    DIRB         <DIR>      8-27-91  10:23
  2065.                               0 bytes in 4 file(s)         0 bytes allocated
  2066.                      18,608,128 bytes free
  2067.  
  2068.               OK, things look right.  Now move the demonstration files to
  2069.               those directories.  4DOS has a built-in MOVE command to move a
  2070.               file from one directory or drive to another, something DOS
  2071.               users have wished for for a long time.
  2072.  
  2073.               Here are the commands to move FILE1 to DIRA, and FILE2 and
  2074.               FILE3 to DIRB:
  2075.  
  2076.                    c:\4dos> move file1 dira
  2077.                    c:\4dos\file1 -> c:\4dos\dira\file1
  2078.                         1 file(s) moved
  2079.  
  2080.                    c:\4dos> move file2 file3 dirb
  2081.                    c:\4dos\file2 -> c:\4dos\dirb\file2
  2082.                    c:\4dos\file3 -> c:\4dos\dirb\file3
  2083.                         2 file(s) moved
  2084.  
  2085.               As usual, 4DOS tells you exactly what it's doing.
  2086.  
  2087.               Now that you've created a subdirectory structure, it's time to
  2088.               get a comprehensive look at it.  Use DIR to look for all the
  2089.               files whose names begin with "file" in the current directory
  2090.               and all of its subdirectories -- that's the DIR /S option:
  2091.  
  2092.                    c:\4dos> dir /s file*
  2093.  
  2094.  
  2095.           ___________________________________________________________________
  2096.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  29
  2097.  
  2098.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2099.           ___________________________________________________________________
  2100.  
  2101.  
  2102.  
  2103.                     Volume in drive C is JPS_TEST    Serial number is ...
  2104.                     Directory of  c:\4dos\dira\file*.*
  2105.  
  2106.                    file1              22   8-27-91  10:37
  2107.                              22 bytes in 1 file(s)     2,048 bytes allocated
  2108.                      18,587,648 bytes free
  2109.  
  2110.                        Total for:  c:\4dos\dira\file*.*
  2111.                              22 bytes in 1 file(s)     2,048 bytes allocated
  2112.  
  2113.                     Directory of  c:\4dos\dirb\file*.*
  2114.  
  2115.                    file2              22   8-27-91  10:37
  2116.                    file3            1938   8-27-91  10:37
  2117.                           1,960 bytes in 2 file(s)     4,096 bytes allocated
  2118.                      18,587,648 bytes free
  2119.  
  2120.                        Total for:  c:\4dos\dirb\file*.*
  2121.                           1,960 bytes in 2 file(s)     4,096 bytes allocated
  2122.  
  2123.                        Total for:  c:\4dos\file*.*
  2124.                           1,982 bytes in 3 file(s)     6,144 bytes allocated
  2125.  
  2126.               DIR has displayed the directory header, filenames, and totals
  2127.               for each of the two subdirectories that contain files matching
  2128.               the name you entered, FILE*.  It also has displayed a grand
  2129.               total.
  2130.  
  2131.               You've seen that DIR can look at several subdirectories at
  2132.               once.  Now do the same thing with DEL, and delete the files
  2133.               you put in your demonstration subdirectories, along with the
  2134.               subdirectories themselves, with a single command.  To do so,
  2135.               you need to use two options: /S and /X.  The first tells DEL
  2136.               to delete files in the current directory and all of its
  2137.               subdirectories.  The /X option makes DEL remove each
  2138.               subdirectory if all the files within it are deleted:
  2139.  
  2140.                    c:\4dos> del /s/x dira dirb
  2141.                    c:\4dos\dira\*.* : Are you sure (Y/N)? Y
  2142.                    Deleting c:\4dos\dira\file1
  2143.                    c:\4dos\dirb\*.* : Are you sure (Y/N)? Y
  2144.                    Deleting c:\4dos\dirb\file2
  2145.                    Deleting c:\4dos\dirb\file3
  2146.                         3 file(s) deleted
  2147.  
  2148.               Note the safety feature that 4DOS gave you here.  When you
  2149.               tell DEL to delete DIRA and DIRB, 4DOS recognizes them as
  2150.  
  2151.  
  2152.           ___________________________________________________________________
  2153.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  30
  2154.  
  2155.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2156.           ___________________________________________________________________
  2157.  
  2158.  
  2159.               directory names and assumes you mean "delete all files in this
  2160.               directory".  Since you're deleting all the files, 4DOS
  2161.               displays a prompt that tells you what's about to be deleted
  2162.               and asks you whether you really want to do the deletion.  Once
  2163.               you answer Y, the files are deleted and the subdirectory is
  2164.               automatically removed because you used the /X switch.
  2165.  
  2166.               4DOS also lets you use file descriptions, so you can describe
  2167.               a file's contents more clearly than with an 8-character file
  2168.               name.  The descriptions can be up to 40 characters long.
  2169.  
  2170.               First, run TOUR2 again to regenerate the three demonstration
  2171.               files.  Then enter a DESCRIBE command, along with a
  2172.               description for each file (you can enter any description you
  2173.               like; you don't have to use the text shown):
  2174.  
  2175.                    c:\4dos> tour2
  2176.                    c:\4dos> describe file*
  2177.                    Describe "c:\4dos\file1" : Tour file 1
  2178.                    Describe "c:\4dos\file2" : Tour file 2
  2179.                    Describe "c:\4dos\file3" : Tour file 3
  2180.  
  2181.               Now look at the descriptions with a DIR command:
  2182.  
  2183.                    c:\4dos> dir file*
  2184.  
  2185.                     Volume in drive C is JPS_TEST    Serial number is ...
  2186.                     Directory of  c:\4dos\file*.*
  2187.  
  2188.                    file1              22   8-27-91  10:48 Tour file 1
  2189.                    file2              22   8-27-91  10:48 Tour file 2
  2190.                    file3            1938   8-27-91  10:49 Tour file 3
  2191.                           1,982 bytes in 3 file(s)     6,144 bytes allocated
  2192.                      18,604,032 bytes free
  2193.  
  2194.               The descriptions will appear any time you ask for a standard,
  2195.               single-column directory display.  They will also appear when
  2196.               you use the SELECT command.  They can be a lifesaver when you
  2197.               have files whose contents you can't remember, or when you have
  2198.               large groups of files with similar names.
  2199.  
  2200.  
  2201.           Directory Navigation
  2202.  
  2203.               4DOS doesn't just make it easier to access files;  it also
  2204.               makes your life much easier when you're navigating through the
  2205.               hard disk directory structure.  You're probably already
  2206.               familiar with the traditional CD command, which you use to
  2207.  
  2208.  
  2209.           ___________________________________________________________________
  2210.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  31
  2211.  
  2212.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2213.           ___________________________________________________________________
  2214.  
  2215.  
  2216.               change directories.  4DOS adds a "go back" option to CD, which
  2217.               is invoked by using the minus sign [-] instead of a directory
  2218.               name.  Try this:
  2219.  
  2220.                    c:\4dos> cd \
  2221.                    c:\> cd -
  2222.                    c:\4dos>
  2223.  
  2224.               The CD - changes back to the directory you were in before the
  2225.               most recent CD command.  It's a convenient way to switch back
  2226.               and forth between two directories.
  2227.  
  2228.               4DOS also lets you change the drive and directory at the same
  2229.               time with the CDD command so you don't have to switch drives
  2230.               first and then change directories.  Here's an example using
  2231.               CDD.  Before you try it, put a floppy disk in drive A:
  2232.  
  2233.                    c:\4dos> cdd a:\
  2234.                    a:\> cdd -
  2235.                    c:\4dos>
  2236.  
  2237.               As you can see, the minus works with CDD as well.
  2238.  
  2239.               For more complex sequences of directory navigation, you can
  2240.               use PUSHD and POPD.  These commands maintain a directory
  2241.               "stack" and let you make several changes, then move back
  2242.               through the directories you've been to.  They can change both
  2243.               drive and directory, like CDD.  For example:
  2244.  
  2245.                    c:\4dos> pushd a:\
  2246.                    a:\> pushd c:\
  2247.                    c:\> popd
  2248.                    a:\> popd
  2249.                    c:\4dos>
  2250.  
  2251.               4DOS also offers you a special environment variable, CDPATH,
  2252.               to help you find the right directory without a lot of typing.
  2253.               CD, CDD, and PUSHD use CDPATH to find the directory you want
  2254.               to change to if they can't find it in the current directory.
  2255.               This can help a lot when you have long but commonly used
  2256.               directory names.  For example, say you have a directory called
  2257.               C:\DBASE\REPORTS which contains a subdirectory for each month
  2258.               of the year.  If you set CDPATH like this:
  2259.  
  2260.                    c:\4dos> set cdpath=c:\dbase\reports
  2261.  
  2262.               Then you can change to the JANUARY subdirectory like this:
  2263.  
  2264.  
  2265.  
  2266.           ___________________________________________________________________
  2267.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  32
  2268.  
  2269.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2270.           ___________________________________________________________________
  2271.  
  2272.  
  2273.                    c:\4dos> cd january
  2274.                    c:\dbase\reports\january> cd -
  2275.                    c:\4dos>
  2276.  
  2277.               CD found the JANUARY subdirectory, saving you from typing the
  2278.               entire name, because its parent directory was listed in
  2279.               CDPATH.  For more details about CDPATH see page 116.
  2280.  
  2281.  
  2282.           Aliases
  2283.  
  2284.               Aliases are one of 4DOS's most powerful features.  Simple
  2285.               aliases are very easy to set up and use (that's what we'll
  2286.               discuss here).  Complex aliases allow you to configure your
  2287.               system just about any way you want, and can take the place of
  2288.               many small batch files.
  2289.  
  2290.               The purpose of aliases is to rename or reconfigure 4DOS
  2291.               commands.  They are defined and viewed with the ALIAS command.
  2292.               In this tour, we'll show you how to set up aliases for the DIR
  2293.               command.  Of course, you can use aliases to enhance any
  2294.               command; for more examples see the ALIAS command on page 169,
  2295.               and the sample file ALIASES that comes with 4DOS.
  2296.  
  2297.               Here's a popular favorite for anyone who uses DIR and wants to
  2298.               be able to use a simple D instead:
  2299.  
  2300.                    c:\4dos> alias d = dir
  2301.  
  2302.               To see what aliases you've defined, enter ALIAS with no
  2303.               parameters:
  2304.  
  2305.                    c:\4dos> alias
  2306.                    d=dir
  2307.  
  2308.               To use the alias, just enter its name at the prompt, like any
  2309.               command:
  2310.  
  2311.                    c:\4dos> d
  2312.  
  2313.                     Volume in drive C is JPS_TEST    Serial number is ...
  2314.                     Directory of  c:\4dos\*.*
  2315.  
  2316.                    .            <DIR>      8-22-91  14:21
  2317.                    ..           <DIR>      8-22-91  14:21
  2318.                    4dos.com        99280   8-26-91   4:00
  2319.                    4dos.doc       345005   8-26-91   4:00
  2320.                    4dos.ico          766   8-26-91   4:00
  2321.  
  2322.  
  2323.           ___________________________________________________________________
  2324.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  33
  2325.  
  2326.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2327.           ___________________________________________________________________
  2328.  
  2329.  
  2330.                    4dos.pif          545   8-26-91   4:00
  2331.                     ... ... ...
  2332.                    tour2.btm        2765   8-26-91   4:00
  2333.                    update40.doc    37946   8-26-91   4:00
  2334.                    vendor.doc       4434   8-26-91   4:00
  2335.                         835,038 bytes in 24 file(s)  858,112 bytes allocated
  2336.                      18,599,936 bytes free
  2337.  
  2338.               Once you've defined an alias, you can use it anywhere a
  2339.               command can be used: at the command prompt, in a batch file,
  2340.               or inside another alias.
  2341.  
  2342.               As an example, build on the D alias you have already defined.
  2343.               Suppose you regularly use 4DOS's 2-column directory listings,
  2344.               discussed near the start of the tour.  Each time you want a
  2345.               directory listing, you use the command DIR /2.  Define an
  2346.               alias, D2, to let you execute this command with the touch of a
  2347.               couple of keys.  Since you have already defined D, you can
  2348.               define D2 in either of these ways (choose one to try):
  2349.  
  2350.                    c:\4dos> alias d2 = dir /2
  2351.                    c:\4dos> alias d2 = d /2
  2352.  
  2353.               If you want to see the results, just enter ALIAS again:
  2354.  
  2355.                    c:\4dos> alias
  2356.                    d=dir
  2357.                    d2=d /2
  2358.  
  2359.               To use this alias, just enter the command D2 and press Enter.
  2360.               You can pass file names to these aliases just like you would
  2361.               to the original command.  For example, D2 *.DOC will give you
  2362.               a 2-column display of the .DOC files.
  2363.  
  2364.               You can create aliases that are even easier to use with 4DOS's
  2365.               keystroke aliases.  These aliases let you assign an Alt or
  2366.               Function key to an alias so you can invoke it by pressing a
  2367.               single key.  Say you'd like to assign the 2-column directory
  2368.               display to F5.  Just define an alias like D2 above, and make
  2369.               the alias name the key name, with an at-sign [@] before it:
  2370.  
  2371.                    c:\4dos> alias @f5 = dir /2
  2372.  
  2373.               Now press F5 and the DIR /2 command will appear on the command
  2374.               line.  Press Enter to execute it, or type some additional
  2375.               arguments and then press Enter if you'd like.  (You can also
  2376.               make key aliases execute as soon as you press the key.  For
  2377.               details on how, see the ALIAS command on page 169.)
  2378.  
  2379.  
  2380.           ___________________________________________________________________
  2381.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  34
  2382.  
  2383.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2384.           ___________________________________________________________________
  2385.  
  2386.  
  2387.               You can use an alias to redefine how a standard command works,
  2388.               without changing its name.  Suppose you always want DIR to
  2389.               display its output in 2 columns, with a vertical sort and a
  2390.               pause at the end of each page.  You might think of using
  2391.               something like this:
  2392.  
  2393.                    c:\4dos> alias dir = dir /2/p/v
  2394.  
  2395.               Go ahead and try that, then do a DIR.  You'll get an error:
  2396.  
  2397.                    c:\4dos> dir
  2398.                    Alias loop
  2399.                    c:\4dos>
  2400.  
  2401.               The "alias loop" error is caused because 4DOS tries to
  2402.               reinterpret the DIR command inside your alias as another
  2403.               attempt to run the same alias.  It's easy to change the alias
  2404.               so this doesn't happen:
  2405.  
  2406.                    c:\4dos> alias dir = *dir /2/p/v
  2407.  
  2408.               The [*] tells 4DOS that what follows is not an alias.  Try the
  2409.               definition above (you can scroll back to the incorrect
  2410.               definition with up-arrow and modify it).  Then do a DIR and
  2411.               you'll see the results.  Using this method, you can redefine
  2412.               the default options for any 4DOS command.
  2413.  
  2414.               Aliases can contain multiple commands and can do much fancier
  2415.               things than what you've seen here.  They're great for creating
  2416.               shorthand names for commonly used programs like your word
  2417.               processor or database, and they will often help get programs
  2418.               loaded faster as well -- if you put the full name of the
  2419.               program in an alias, 4DOS doesn't have to search your PATH for
  2420.               it.
  2421.  
  2422.               For complete details, see the overview of aliases beginning on
  2423.               page 96, and the ALIAS command reference on page 169.
  2424.  
  2425.               When you read about aliases in the rest of the manual, you'll
  2426.               notice that most alias definitions are shown with back-quotes
  2427.               [`] around the part after the name.  Some aliases require
  2428.               these back-quotes when they are defined at the command line or
  2429.               in a batch file, to make it clear to 4DOS what is and isn't
  2430.               part of the alias.
  2431.  
  2432.               We show aliases that way elsewhere because it's the safest way
  2433.               to enter them at the command line.  If you always use the
  2434.               back-quotes, you don't have to worry about whether a
  2435.  
  2436.  
  2437.           ___________________________________________________________________
  2438.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  35
  2439.  
  2440.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2441.           ___________________________________________________________________
  2442.  
  2443.  
  2444.               particular alias needs them or not.  We didn't use them here
  2445.               because none of these aliases require back quotes and we
  2446.               didn't want to add extra typing during the tour.
  2447.  
  2448.  
  2449.           Other Commands
  2450.  
  2451.               There are a few other commands that we'll just touch on, so
  2452.               that you can see some of 4DOS's other capabilities.
  2453.  
  2454.               First, turn on the 4DOS LOG facility, which records all the
  2455.               commands you enter in a file.  Enter the command:
  2456.  
  2457.                    c:\4dos> log /w mylog
  2458.  
  2459.               You won't see anything else happen, but you've turned logging
  2460.               on.  We'll return to the 4DOS log later.
  2461.  
  2462.               4DOS has a couple of commands that let you control screen
  2463.               color.  The examples here will work on any system with a color
  2464.               video board (the commands work on monochrome systems, too, but
  2465.               you're restricted to the colors white and black).  Try
  2466.               clearing the screen to a specific color:
  2467.  
  2468.                    c:\4dos> cls bright white on magenta
  2469.  
  2470.               Now let's set a different color:
  2471.  
  2472.                    c:\4dos> color bright yellow on blue
  2473.  
  2474.               The behavior of the COLOR command varies, depending on whether
  2475.               you have an ANSI driver loaded.  If you don't, COLOR will
  2476.               change the color of the entire screen immediately.  If you do
  2477.               have an ANSI driver loaded, COLOR only affects the color of
  2478.               text displayed after it's executed, and not the color of text
  2479.               already on the screen.  If you don't know, don't worry about
  2480.               it -- just experiment with COLOR and see.
  2481.  
  2482.               The FREE and MEMORY commands help you keep track of system
  2483.               resources.  FREE tells you about free space on your disk
  2484.               drives (and is much faster than CHKDSK).  MEMORY tells you
  2485.               about memory resources, including expanded and extended memory
  2486.               and 4DOS's internal alias and history storage areas.  Here are
  2487.               examples of the output from our test system; try the commands
  2488.               on your system and see what values you get.
  2489.  
  2490.                    c:\4dos> free
  2491.                     Volume in drive C is JPS_TEST    Serial number is ...
  2492.  
  2493.  
  2494.           ___________________________________________________________________
  2495.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  36
  2496.  
  2497.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2498.           ___________________________________________________________________
  2499.  
  2500.  
  2501.                      41,826,304 bytes total disk space
  2502.                      23,232,512 bytes used
  2503.                      18,593,792 bytes free
  2504.  
  2505.                    c:\4dos> memory
  2506.                         655,360 bytes total DOS RAM
  2507.                         612,256 bytes free
  2508.  
  2509.                       7,815,168 bytes total EMS memory
  2510.                         688,128 bytes free
  2511.  
  2512.                          12,288 bytes free XMS memory  (HMA in use)
  2513.  
  2514.                           1,792 bytes total environment
  2515.                             233 bytes free
  2516.  
  2517.                           6,144 bytes total alias
  2518.                           1,045 bytes free
  2519.  
  2520.                           1,024 bytes total history
  2521.  
  2522.               The TIMER command lets you time events.  The following line
  2523.               also shows 4DOS's ability to accept multiple commands on one
  2524.               line, separated by a caret [^].  It starts the timer, runs the
  2525.               TOUR2.BTM file to create the three demonstration files,
  2526.               deletes the three files, and then stops the timer and displays
  2527.               the time the whole operation took.  Enter this command to time
  2528.               the entire sequence on your computer:
  2529.  
  2530.                    c:\4dos> timer ^ tour2 ^ del file1 file2 file3 ^ timer
  2531.                    Timer 1 on: 11:10:01
  2532.  
  2533.                    Please wait ...
  2534.  
  2535.                    File creation completed
  2536.                    Deleting c:\4dos\file1
  2537.                    Deleting c:\4dos\file2
  2538.                    Deleting c:\4dos\file3
  2539.                         3 file(s) deleted
  2540.                    Timer 1 off: 11:10:06 elapsed: 0:00:05.11
  2541.  
  2542.               Now return to the log that you started a few minutes ago.
  2543.               Turn logging off, then take a look at what was recorded.
  2544.               Enter the following two commands;  the output will pause at
  2545.               the end of each page:
  2546.  
  2547.                    c:\4dos> log off
  2548.                    c:\4dos> type mylog /p
  2549.  
  2550.  
  2551.           ___________________________________________________________________
  2552.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  37
  2553.  
  2554.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2555.           ___________________________________________________________________
  2556.  
  2557.  
  2558.                    [ 8-22-91 11:05:02] cls bright white on magenta
  2559.                    [ 8-22-91 11:05:54] color bright yellow on blue
  2560.                    [ 8-22-91 11:07:08] free
  2561.                    [ 8-22-91 11:07:49] memory
  2562.                    [ 8-22-91 11:09:55] timer
  2563.                    [ 8-22-91 11:09:56] tour2
  2564.                      ... (commands from TOUR2.BTM will be displayed here)
  2565.                    [ 8-22-91 11:10:00] del file1 file2 file3
  2566.                    [ 8-22-91 11:10:01] timer
  2567.                    [ 8-22-91 11:12:35] log off
  2568.  
  2569.               As you can see, the log contains every command you entered
  2570.               plus a date and time stamp.  It's a complete record of system
  2571.               activity, including commands you type and those entered from
  2572.               batch files and aliases.  You can use it as a record of your
  2573.               work, for security purposes, or for anything else you desire.
  2574.               You may want to clean up the directory now by deleting this
  2575.               demonstration log with a DEL MYLOG command.
  2576.  
  2577.  
  2578.           Batch Programming
  2579.  
  2580.               This final section demonstrates a very little bit of what 4DOS
  2581.               can do for your batch files.  If you've never worked with
  2582.               batch files, you may want to skip this section.  If you aren't
  2583.               sure, give it a try and stop if things seem too complex.  You
  2584.               don't have to be a batch file programmer to use 4DOS.
  2585.  
  2586.               Rather than having you go to the trouble of writing actual
  2587.               batch files, we'll demonstrate some of the parts of 4DOS's
  2588.               batch file power that work just as well at the prompt.
  2589.  
  2590.               Some 4DOS batch file improvements aid in communicating with
  2591.               the user.  You can make sounds:
  2592.  
  2593.                    c:\4dos> beep 440 2 880 8 660 4
  2594.  
  2595.               You can draw boxes and lines.  Enter each of these commands on
  2596.               one line; use the second set of commands if you have a
  2597.               monochrome monitor:
  2598.  
  2599.                    c:\4dos> cls bright white on blue
  2600.                    c:\4dos> drawbox 10 10 20 70 4 bright cyan on black fill
  2601.                              black
  2602.                    c:\4dos> drawhline 15 10 61 1 bright cyan on black
  2603.  
  2604.                    c:\4dos> cls bright white on black
  2605.                    c:\4dos> drawbox 10 10 20 70 4 black on white fill white
  2606.  
  2607.  
  2608.           ___________________________________________________________________
  2609.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  38
  2610.  
  2611.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2612.           ___________________________________________________________________
  2613.  
  2614.  
  2615.                    c:\4dos> drawhline 15 10 61 1 black on white
  2616.  
  2617.               Notice that 4DOS correctly connects the line to the box where
  2618.               they intersect.  4DOS has additional commands like SCREEN and
  2619.               SCRPUT, which we won't demonstrate here, to display text
  2620.               anywhere on the screen and in any color.
  2621.  
  2622.               4DOS also helps you ask the user for input.  Try this (be sure
  2623.               to use two percent signs before the second "letter"):
  2624.  
  2625.                    c:\4dos> inkey Enter a letter: %%letter
  2626.                    Enter a letter: A
  2627.  
  2628.               The letter you typed was stored in your environment in the
  2629.               variable named LETTER.  Use the SET command to view it:
  2630.  
  2631.                    c:\4dos> set
  2632.                    COMSPEC=C:\4DOS\4DOS.COM
  2633.                     ... ... ...
  2634.                    LETTER=A
  2635.  
  2636.               The user can also type full strings if you use the INPUT
  2637.               command:
  2638.  
  2639.                    c:\4dos> input Enter a string: %%string
  2640.                    Enter a string: Type anything you like here ...
  2641.  
  2642.               Again, SET will let you view the string, stored in the
  2643.               environment variable STRING.
  2644.  
  2645.               Once you've collected some input, you will probably want to
  2646.               test it with the 4DOS IF and IFF commands.  Here's one
  2647.               example.  Enter this on one line (there's plenty of room;
  2648.               4DOS command lines can be up to 255 characters long).  Note
  2649.               that two percent signs are used in the INKEY command and one
  2650.               is used in the IFF, and that a double equal sign is used in
  2651.               the IFF statement.
  2652.  
  2653.                    c:\4dos> inkey Enter a letter: %%letter ^
  2654.                             iff "%letter"=="A" then ^ echo hi ^ else ^
  2655.                             echo bye ^ endiff
  2656.  
  2657.               Try using the up-arrow to repeat the command several times,
  2658.               giving different responses to the "Enter a letter" prompt.
  2659.  
  2660.               4DOS offers dozens of additional batch file improvements.  For
  2661.               more information see the section on batch files beginning on
  2662.               page 98, and the reference for each individual command.
  2663.  
  2664.  
  2665.           ___________________________________________________________________
  2666.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  39
  2667.  
  2668.                                             CHAPTER 3 / A GUIDED TOUR OF 4DOS
  2669.           ___________________________________________________________________
  2670.  
  2671.  
  2672.           Conclusion
  2673.  
  2674.               This has been a very fast tour of some of the most popular
  2675.               features of 4DOS.  There are many more features, commands and
  2676.               options to explore, as well as ways to customize 4DOS so that
  2677.               it suits your computing habits and needs.  One of 4DOS's best
  2678.               features is its ability to adapt to your way of working
  2679.               instead of requiring you to adapt to it.
  2680.  
  2681.               If you selected "Tour Installation" when you ran the 4DOS
  2682.               INSTALL program, you will probably want to perform a full
  2683.               installation now.  You can put the 4DOS disk in your floppy
  2684.               drive, run INSTALL, and follow the instructions on the screen.
  2685.               If you need help, refer to the installation instructions on
  2686.               page 13.
  2687.  
  2688.               To learn more about specific 4DOS commands, look through the
  2689.               Command Reference section of this manual, beginning on page
  2690.               162.  To learn more about the dozens of 4DOS features that
  2691.               aren't related to specific commands, read through Chapter 5 /
  2692.               Using 4DOS, beginning on page 54.
  2693.  
  2694.  
  2695.  
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.           ___________________________________________________________________
  2723.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  40
  2724.  
  2725.                                                  CHAPTER 4 / GENERAL CONCEPTS
  2726.           ___________________________________________________________________
  2727.  
  2728.  
  2729.  
  2730.           CHAPTER 4 / GENERAL CONCEPTS
  2731.  
  2732.  
  2733.           You can start using 4DOS as soon as you finish installing it,
  2734.           because 4DOS is compatible with the traditional commands you're
  2735.           used to.  But most users find that the more they know about their
  2736.           computer systems, the more power they get from 4DOS.  And, the more
  2737.           experienced they become with 4DOS, the more they want to know about
  2738.           their computer system as a whole.
  2739.  
  2740.           This section of the manual explains some fundamental concepts about
  2741.           your computer, DOS, and 4DOS.  It should help you understand the
  2742.           terms and concepts in the pages that follow.  If you find some of
  2743.           the concepts overwhelming, just remember that they are here when
  2744.           you need them.  If you find this material too simple, skim over the
  2745.           topics and then go on to the next section.  Each topic in this
  2746.           chapter is independent, so if you read it straight through you
  2747.           won't necessarily find a natural "flow" from one topic to another.
  2748.  
  2749.           If you come across terms or concepts in this chapter that you are
  2750.           unsure about, refer to the Glossary on page 342 or the Index.
  2751.  
  2752.  
  2753.           DOS and the Command Interpreter
  2754.  
  2755.               When you turn on your computer, it first runs some internal
  2756.               diagnostics and then looks for a boot disk, either a floppy
  2757.               disk in drive A or your hard disk.  There is nothing magical
  2758.               about a boot disk;  it simply has a copy of DOS and a command
  2759.               interpreter available, plus a small block of special
  2760.               information that tells the computer that it is indeed a boot
  2761.               disk.
  2762.  
  2763.               The core portion of DOS consists of two hidden files (files
  2764.               that are normally invisible to the DIR command).  They aren't
  2765.               hidden to keep you from copying or examining them, but rather
  2766.               to keep you from accidentally erasing them.  The names of the
  2767.               files depend on the version of DOS you are using, but they are
  2768.               usually something like MSDOS.SYS and IO.SYS.  These two files
  2769.               contain the operating system, which controls your disk files
  2770.               and directories, loads and runs programs, maintains the system
  2771.               time and date, and performs other housekeeping tasks.
  2772.  
  2773.               After the computer loads DOS into memory, it performs some
  2774.               standard initialization tasks and then looks for a file called
  2775.               CONFIG.SYS, which contains user-specified initialization
  2776.               commands.  You can view and edit your CONFIG.SYS file with any
  2777.  
  2778.  
  2779.           ___________________________________________________________________
  2780.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  41
  2781.  
  2782.                                                  CHAPTER 4 / GENERAL CONCEPTS
  2783.           ___________________________________________________________________
  2784.  
  2785.  
  2786.               text editor.  One of the optional lines in CONFIG.SYS begins
  2787.               with the word SHELL.  That line names the command interpreter
  2788.               that DOS should load as it completes its initialization.
  2789.  
  2790.               A command interpreter is a program that accepts your
  2791.               instructions and carries them out.  The command interpreter
  2792.               shipped with DOS is called COMMAND.COM.  Once you have 4DOS
  2793.               installed, 4DOS.COM replaces COMMAND.COM as your command
  2794.               interpreter.  Both COMMAND.COM and 4DOS are normal programs
  2795.               that know how to translate your commands into actions.  4DOS
  2796.               is simply a much more powerful command interpreter than
  2797.               COMMAND.COM.
  2798.  
  2799.  
  2800.               Primary and Secondary Shells
  2801.  
  2802.               Technically, the command interpreter is a shell:  a program
  2803.               that understands your commands and makes the correct calls to
  2804.               DOS to perform various operations, including running programs.
  2805.  
  2806.               The command interpreter that runs when the computer boots up
  2807.               is called the primary shell.  Any command interpreter that is
  2808.               run by an application program with a "shell to DOS" feature,
  2809.               or that is run by a multitasking program like Windows or
  2810.               DESQView, is a secondary shell.  4DOS can be run as a primary
  2811.               shell and as a secondary shell.
  2812.  
  2813.               A secondary shell has all the same features as a primary
  2814.               shell, but you can leave a secondary shell with the EXIT
  2815.               command.  There is no way to exit from the primary shell,
  2816.               because your computer needs a shell present to operate.  (You
  2817.               can exit from the primary shell in one special case:  if
  2818.               you're running in the DOS compatibility box of OS/2 version
  2819.               2.0.)
  2820.  
  2821.               There are only a few differences between primary and secondary
  2822.               shells.  Generally, less memory is available when a secondary
  2823.               shell is running, because at least part of the program that
  2824.               started it is still in memory waiting to spring back to life
  2825.               when you exit.  And normally only the primary shell
  2826.               automatically executes the instructions in your AUTOEXEC.BAT
  2827.               file.
  2828.  
  2829.               You may also see the term shell used to describe programs
  2830.               which assist you in managing your files (for example XTree or
  2831.               Lotus Magellan).  This is a different and less precise meaning
  2832.               of "shell" than the one used above and elsewhere in this
  2833.               manual.  Such programs are also sometimes called "visual
  2834.  
  2835.  
  2836.           ___________________________________________________________________
  2837.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  42
  2838.  
  2839.                                                  CHAPTER 4 / GENERAL CONCEPTS
  2840.           ___________________________________________________________________
  2841.  
  2842.  
  2843.               shells" because they use a menu or graphical interface to
  2844.               receive commands.  Unlike 4DOS, these programs are not command
  2845.               interpreters, and cannot replace COMMAND.COM.
  2846.  
  2847.  
  2848.               AUTOEXEC.BAT, 4START, and 4EXIT
  2849.  
  2850.               When a primary shell, either COMMAND.COM or 4DOS, gets control
  2851.               from DOS during boot up, one of its first responsibilities is
  2852.               to look for and run a batch file called AUTOEXEC.BAT, if that
  2853.               file is available in the root directory of the boot drive.
  2854.               This file is simply a list of commands that you want to have
  2855.               executed every time your computer boots up.  If COMMAND.COM
  2856.               cannot find AUTOEXEC.BAT, it asks you for the time and date.
  2857.               4DOS skips that step and immediately displays a standard
  2858.               prompt (e.g., c:\>).
  2859.  
  2860.               Every time 4DOS starts as either a primary or secondary shell,
  2861.               it also looks for an optional batch file called 4START.BTM or
  2862.               4START.BAT, and runs the file if it finds it.  4START is a
  2863.               convenient place to put special 4DOS configuration commands.
  2864.  
  2865.               Whenever you exit from a 4DOS secondary shell, 4DOS looks for
  2866.               another optional file called 4EXIT.BTM or 4EXIT.BAT and runs
  2867.               the file if it finds it.  4EXIT is not necessary in most
  2868.               circumstances, but is a convenient place to put commands to
  2869.               save information from a secondary shell before it exits.
  2870.  
  2871.               AUTOEXEC.BAT, 4START, and 4EXIT are called automatic batch
  2872.               files because they run without your intervention at specific
  2873.               times.  4START and 4EXIT should not be used to load any memory
  2874.               resident programs (TSRs).  Otherwise, these three files can
  2875.               include any commands that could be part of any batch file or
  2876.               any commands which you could type from the command line.
  2877.  
  2878.               For more details about batch files and batch file commands,
  2879.               see pages 98 and 163.
  2880.  
  2881.  
  2882.           Command Processing
  2883.  
  2884.               Whenever you type something at the command line and press the
  2885.               Enter key, you have given a command to 4DOS, which must figure
  2886.               out how to execute your command.  If you understand the
  2887.               general process that 4DOS uses, you will be able to make the
  2888.               best use of the 4DOS commands.
  2889.  
  2890.  
  2891.  
  2892.  
  2893.           ___________________________________________________________________
  2894.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  43
  2895.  
  2896.                                                  CHAPTER 4 / GENERAL CONCEPTS
  2897.           ___________________________________________________________________
  2898.  
  2899.  
  2900.               4DOS begins by dividing the line you typed into an action word
  2901.               and a command tail.  The action word is the first word in the
  2902.               command;  the tail is everything that follows the command
  2903.               word.  For example, in the command line
  2904.  
  2905.                    dir *.txt /p/o/n
  2906.  
  2907.               the action word is "dir," and the command tail is "*.txt
  2908.               /p/o/n."
  2909.  
  2910.               To decide what activity to perform, 4DOS makes five attempts
  2911.               to understand the action word:
  2912.  
  2913.               First, 4DOS tries to match the action word against its
  2914.               internal list of aliases, which are synonyms that you have
  2915.               defined for commands.  If it finds a match between the action
  2916.               word you typed and one of the aliases you've defined, it
  2917.               replaces the action word you typed with the action word from
  2918.               the alias.  (This substitution is done internally, and is not
  2919.               normally visible to you).  Once it has finished with the
  2920.               aliases, 4DOS continues with the steps listed below to
  2921.               identify the meaning of the new action word.
  2922.  
  2923.                    4DOS first tries to match the action word against its
  2924.                    list of more than 80 internal commands, which are actions
  2925.                    that are built into 4DOS.  If it finds a match, 4DOS
  2926.                    performs the internal command and then waits for a new
  2927.                    instruction from you.
  2928.  
  2929.                    If there is no match with any of 4DOS's internal
  2930.                    commands, it looks for an executable file (one with a
  2931.                    .COM or .EXE extension) whose name matches the action
  2932.                    word.  It runs the executable file if it finds one.  This
  2933.                    is called an external command or external program.
  2934.  
  2935.                    Next, 4DOS looks for a batch file (with a .BTM or .BAT
  2936.                    extension) that matches the action word.  If it finds
  2937.                    such a file, it then reads each line in the file as a new
  2938.                    command.
  2939.  
  2940.                    Finally, 4DOS checks to see if the action word matches
  2941.                    the name of a file with an extension that you have
  2942.                    defined as executable.  If a match is found, 4DOS runs
  2943.                    the program you specified when you defined the executable
  2944.                    extension.  (Executable extensions are used to associate
  2945.                    file extensions with the specific program that processes
  2946.                    a particular type of file; see page 75 for details).
  2947.  
  2948.  
  2949.  
  2950.           ___________________________________________________________________
  2951.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  44
  2952.  
  2953.                                                  CHAPTER 4 / GENERAL CONCEPTS
  2954.           ___________________________________________________________________
  2955.  
  2956.  
  2957.               4DOS first tries the last three steps in the current
  2958.               directory.  If the action word doesn't match a .COM, .EXE,
  2959.               .BTM, or .BAT file or an executable extension in the current
  2960.               directory, 4DOS repeats its search in every directory in your
  2961.               PATH.  The PATH is a list of directories that 4DOS (and some
  2962.               applications) search to look for executable files.  If all
  2963.               these searches fail, 4DOS displays an "Unknown command" error
  2964.               message and waits for your next instruction.
  2965.  
  2966.               If 4DOS finds a matching internal command in the first step,
  2967.               that command begins its activity by examining the command
  2968.               tail.  Some commands require information in the command tail,
  2969.               some accept optional information, and others don't allow any
  2970.               command tail at all.  The command tail for internal commands
  2971.               usually contains filenames, directory names, option switches
  2972.               which modify the command's behavior, or other information.
  2973.  
  2974.               4DOS makes the command tail available to every alias, batch
  2975.               file, and external command that it executes.  Aliases and
  2976.               batch files can examine the command tail by using "replaceable
  2977.               parameters," (see page 100).  External commands examine the
  2978.               command tail in a manner determined by the programmer who
  2979.               wrote that particular external program.
  2980.  
  2981.               It is up to each command to examine the command tail to make
  2982.               sure that the information it has received makes sense.  If you
  2983.               use an option switch which the command doesn't understand, or
  2984.               if you omit a required piece of information, the command
  2985.               issues an error message and ends.  Therefore, the command
  2986.               lines that you create must fit the format that each alias,
  2987.               internal or external command, or batch file expects.
  2988.  
  2989.               The process that internal and external commands go through to
  2990.               separate the individual elements of the command line, make
  2991.               sure you used the correct syntax, and understand what you have
  2992.               requested, is called parsing.
  2993.  
  2994.  
  2995.           Files and Paths
  2996.  
  2997.               You may have dozens, hundreds, or thousands of files stored on
  2998.               your computer's disks.  DOS is responsible for managing all of
  2999.               these files.  In order to do so, it uses a unique name to
  3000.               locate each file in much the same way that the post office
  3001.               assigns a unique address to every residence.
  3002.  
  3003.               The unique name of any file is composed of a drive letter, a
  3004.               directory path, and a filename.  Each of these parts of the
  3005.  
  3006.  
  3007.           ___________________________________________________________________
  3008.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  45
  3009.  
  3010.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3011.           ___________________________________________________________________
  3012.  
  3013.  
  3014.               file's name is case insensitive;  you can mix upper and lower
  3015.               case letters in any way you wish.
  3016.  
  3017.               A drive letter designates which drive contains the file.  In a
  3018.               file's full name, the drive letter is followed by a colon.
  3019.               Drive letters A: and B: are normally reserved for the floppy
  3020.               disk drives.  (Systems with a single drive use both A: and B:
  3021.               for that drive.  DOS asks you to swap diskettes as necessary
  3022.               to turn that single physical drive into two separate logical
  3023.               disk drives.)
  3024.  
  3025.               Normally, drive C: is the first (or only) hard disk drive.
  3026.               Later versions of DOS and some utility programs can divide a
  3027.               large hard disk into multiple logical drives that are usually
  3028.               called C:, D:, E:, etc.  Also, the DOS utility SUBST lets you
  3029.               use drive letters as a substitute for directory names.  Many
  3030.               network systems (LANs) use a similar feature to give drive
  3031.               letters to sections of the network file server drives.
  3032.  
  3033.               Some computers also have "RAM disks", which are areas of
  3034.               memory set aside by software (a "RAM disk driver") for use as
  3035.               fast, but temporary storage.  RAM disks are also assigned
  3036.               drive letters, typically using letters beyond that used by the
  3037.               last hard disk in the system, but before any network drives.
  3038.               For example, on a system with a large hard disk you might have
  3039.               A: and B: as floppy drives, C:, D:, and E: as parts of the
  3040.               hard disk, F: as a RAM disk, and G: and H: as network drives.
  3041.  
  3042.               Directories are used to divide the files on a drive into
  3043.               logical groups that are easy to work with.  Their purpose is
  3044.               similar to the use of file drawers to contain groups of
  3045.               hanging folders, hanging folders to contain smaller manila
  3046.               folders, and so on.
  3047.  
  3048.               Every drive has a root or base directory, and many have one or
  3049.               more subdirectories.  Subdirectories can also have
  3050.               subdirectories, extending in a branching tree structure from
  3051.               the root directory.  The collection of all directories on a
  3052.               drive is often called the directory tree, and a portion of the
  3053.               tree is sometimes called a subtree.  The terms directory and
  3054.               subdirectory are typically used interchangeably to mean a
  3055.               single subdirectory within this tree structure.
  3056.  
  3057.               Subdirectory names follow the same naming rules as files (see
  3058.               below): a base name followed by an optional extension.
  3059.               However, some application programs do not properly handle
  3060.               subdirectory names that have an extension.  It is best to use
  3061.  
  3062.  
  3063.  
  3064.           ___________________________________________________________________
  3065.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  46
  3066.  
  3067.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3068.           ___________________________________________________________________
  3069.  
  3070.  
  3071.               only an 8 character (or less) name, without an extension, for
  3072.               subdirectories.
  3073.  
  3074.               The drive and subdirectory portion of a file's name are
  3075.               collectively called the file's path.  For example, the file
  3076.               name C:\DIR1\DIR2\MYFILE.DAT says to look for the file
  3077.               MYFILE.DAT in the subdirectory DIR2 which is part of the
  3078.               subdirectory DIR1 which is on drive C.  The path for
  3079.               MYFILE.DAT is C:\DIR1\DIR2.  The backslashes between
  3080.               subdirectory names are required.  The total length of a file's
  3081.               path may not exceed 64 characters (excluding the file name and
  3082.               extension, but including the drive letter and colon).
  3083.  
  3084.               DOS remembers both a current or default drive for your system
  3085.               as a whole, and a current or default directory for every drive
  3086.               in your system.  Whenever a program tries to create or access
  3087.               a file without specifying the file's path, DOS uses the
  3088.               current drive (if no other drive is specified) and the current
  3089.               directory (if no other directory path is specified).
  3090.  
  3091.               The root directory is named using the drive letter and a
  3092.               single backslash.  For example, D:\ refers to the root
  3093.               directory of drive D:.  Using a drive letter with no directory
  3094.               name at all refers to the current directory on the specified
  3095.               drive.  For example, E:4DOS.DOC refers to the file 4DOS.DOC in
  3096.               the current directory on drive E:.
  3097.  
  3098.               There are also two special subdirectory names that are useful
  3099.               in many situations: a single period [.] by itself means "the
  3100.               current default directory."  Two periods together [..] means
  3101.               "the directory which contains the current default directory"
  3102.               (often referred to as the parent directory).  These special
  3103.               names can be used wherever a full directory name can be used.
  3104.               4DOS allows you to use additional periods to specify
  3105.               directories further "up" the tree (see page 185).
  3106.  
  3107.               Finally, each file has a filename.  The filename consists of a
  3108.               base name of 1 to 8 characters plus an optional extension
  3109.               composed of a period plus 1 to 3 more characters.  You can use
  3110.               alphabetic and numeric characters plus the punctuation marks !
  3111.               # $ % & ' ( ) - @ ^ _ ` { } and ~ in both the base name and
  3112.               the extension.  Because the exclamation point [!], percent
  3113.               sign [%], caret [^], at-sign [@], parentheses [()], and back-
  3114.               quote [`] also have other meanings to 4DOS, it is best to
  3115.               avoid using them in filenames.
  3116.  
  3117.               Each file also has attributes which define characteristics of
  3118.               the file which may be useful to DOS, to you, or to an
  3119.  
  3120.  
  3121.           ___________________________________________________________________
  3122.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  47
  3123.  
  3124.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3125.           ___________________________________________________________________
  3126.  
  3127.  
  3128.               application program.  Attributes can be set with 4DOS's ATTRIB
  3129.               command (see page 178) and viewed with the ATTRIB and DIR
  3130.               commands.  Every time a program modifies a file, DOS sets the
  3131.               Archive attribute, which signals that the file has been
  3132.               modified since it was last backed up.  This can be used by
  3133.               4DOS to determine which files to COPY, and by backup programs
  3134.               to determine which files to back up.  When the Read-only
  3135.               attribute is set, the file can't be changed or erased; this
  3136.               can be used to protect important files from damage.  The
  3137.               Hidden and System attributes prevent the file from appearing
  3138.               in normal directory listings.  The 4DOS DIR command (see page
  3139.               204) has options which allow you to select filenames to view
  3140.               based on their attributes, to view the attributes themselves,
  3141.               and to view information about normally "invisible" hidden and
  3142.               system files.
  3143.  
  3144.               When a file is created, and every time it is modified, DOS
  3145.               records the system time and date in a time stamp in the file's
  3146.               directory entry.  Several 4DOS commands and variable
  3147.               functions, and many backup and utility programs, use this time
  3148.               stamp to determine the relative ages of files.
  3149.  
  3150.  
  3151.           The Environment
  3152.  
  3153.               The command interpreter keeps a list of information about your
  3154.               computer in memory.  This list is called the environment.
  3155.               Every program receives a copy of the environment when it
  3156.               begins, and many programs use some of its information to
  3157.               configure themselves or to find files.
  3158.  
  3159.               The environment is arranged as a series of variables and their
  3160.               related values.  Each variable is a name stored in upper case.
  3161.               The name is followed by an equal sign [=] and some text.  You
  3162.               can view the environment with the SET command, and add new
  3163.               entries or edit existing entries with SET and ESET.  A typical
  3164.               environment entry looks like this:
  3165.  
  3166.                LIB=c:\lib
  3167.  
  3168.               In this example, the name of the variable is LIB and its value
  3169.               is "c:\lib."
  3170.  
  3171.               The format and meaning of each entry in the environment is up
  3172.               to the program that uses the particular variable.  Environment
  3173.               variables can contain just about anything, and can be used for
  3174.               any purpose the author of a program desires.  The "purpose" of
  3175.               the environment as a whole is simply to hold small amounts of
  3176.  
  3177.  
  3178.           ___________________________________________________________________
  3179.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  48
  3180.  
  3181.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3182.           ___________________________________________________________________
  3183.  
  3184.  
  3185.               text which programs can then access according to their own
  3186.               rules.  Most environment variables are used by single programs
  3187.               for their own information;  a few have well-defined meanings
  3188.               and are used by many different programs.
  3189.  
  3190.               One of the most important environment variables is called
  3191.               PATH.  The text of PATH is a list of subdirectories separated
  3192.               by semi-colons.  4DOS searches each of the subdirectories
  3193.               listed in the PATH entry to find executable files that aren't
  3194.               in the default directory.  Many programs also search the PATH
  3195.               list to find their own files.
  3196.  
  3197.               4DOS uses several environment variables to control its own
  3198.               behavior, and provides a wide range of facilities for
  3199.               manipulating and managing the environment.  See page 115 for
  3200.               additional details.
  3201.  
  3202.  
  3203.           Memory
  3204.  
  3205.               The memory in your computer is organized in bytes.  Normally,
  3206.               the amount of memory in a computer is discussed in terms of
  3207.               kilobytes (KBytes or 1,024 bytes) and megabytes (MBytes or
  3208.               1,048,576 bytes or 1,024 KBytes).  The amount of memory
  3209.               available in your computer is determined by the number of
  3210.               memory chips you have installed.
  3211.  
  3212.               In an ideal world, there would be little more to say about
  3213.               memory.  But because of the history of PCs, the needs of large
  3214.               application programs, and the capabilities of advanced CPUs,
  3215.               there are many different kinds of memory.  The original 8088
  3216.               CPUs of the PC and PC/XT can address 1 MByte of memory.  Of
  3217.               that, a maximum of 640KBytes is allocated as base,
  3218.               conventional, DOS, or low DOS memory (all these terms mean the
  3219.               same thing).  The other 384 KBytes, known as upper memory, are
  3220.               set aside for the computer's built-in ROM BIOS, video adapter
  3221.               cards, hard disk controllers, and other expansion hardware.
  3222.  
  3223.               When base memory became too limiting, expanded memory (or EMS
  3224.               memory) was developed to give programs more data space.
  3225.               Expanded memory adds up to 16 MBytes which programs can
  3226.               access, 64KBytes at a time, through a window in upper memory.
  3227.               In 8088 / 8086 (PC and XT), and 80286 (AT) based computers,
  3228.               expanded memory typically requires an add-on board and support
  3229.               software.  In 386 and 486 computers, expanded memory is
  3230.               typically provided without additional hardware, using the
  3231.               capabilities of the 386/486 chips.
  3232.  
  3233.  
  3234.  
  3235.           ___________________________________________________________________
  3236.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  49
  3237.  
  3238.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3239.           ___________________________________________________________________
  3240.  
  3241.  
  3242.               The 80286 CPU used in the AT, and modern 386 and 486 CPUs, can
  3243.               use much more than the 8088's original 1 MByte of memory.  An
  3244.               80286 can use a total of 16 MBytes;  the 386 and 486 can use
  3245.               up to a whopping 4,096 MBytes.  This extended memory is not
  3246.               normally available to DOS-based programs, however, without
  3247.               special programming techniques and the help of DOS extenders
  3248.               or memory managers.
  3249.  
  3250.               The memory terms used in this manual include
  3251.  
  3252.                    BASE memory:  The 640 Kbytes or less that has
  3253.                    traditionally been available for DOS and DOS-based
  3254.                    applications.
  3255.  
  3256.                    EMS or LIM EMS Memory:  Memory which conforms to the
  3257.                    Expanded Memory Specification, developed by Lotus, Intel,
  3258.                    and Microsoft, that lets programs and utilities share
  3259.                    expanded memory.
  3260.  
  3261.                    Extended Memory:  Memory beyond 1 MB in 80286, 386, and
  3262.                    486 computers.  This memory may be accessed directly, in
  3263.                    which case it is referred to as Extended Memory, or
  3264.                    through XMS software, in which case it is referred to as
  3265.                    XMS Memory (see below).
  3266.  
  3267.                    XMS Memory:  Extended memory managed by software which
  3268.                    conforms to the Extended Memory Specification (XMS).  XMS
  3269.                    lets programs share extended memory without conflict.
  3270.                    This specification divides extended memory into extended
  3271.                    memory blocks (EMBs).  XMS software also usually manages
  3272.                    the HMA and the UMBs (see below).
  3273.  
  3274.                    HMA:  The first 64K bytes of extended memory, located
  3275.                    just above 1 MB.  Certain specialized programs such as
  3276.                    DESQView, some network drivers, and portions of MS-DOS
  3277.                    5.0 and DR-DOS 5.0 can be loaded into the HMA instead of
  3278.                    taking up valuable space in base memory.
  3279.  
  3280.                    UMBs:  386 and 486 computers can electronically move
  3281.                    pieces of extended memory into unused space in the upper
  3282.                    memory area between 640KB and 1 MB.  Each block of this
  3283.                    memory is called an Upper Memory Block (UMB).  With DOS
  3284.                    5.0 or special 386/486 memory managers, memory-resident
  3285.                    programs can be loaded into these UMBs instead of taking
  3286.                    up valuable space in base memory.  Some 8086, 8088, and
  3287.                    80286 systems can also use UMBs with appropriate
  3288.                    additional hardware and software (see page 140 for
  3289.                    details).
  3290.  
  3291.  
  3292.           ___________________________________________________________________
  3293.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  50
  3294.  
  3295.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3296.           ___________________________________________________________________
  3297.  
  3298.  
  3299.           ASCII and Key Codes
  3300.  
  3301.               Internally, computers use numbers for everything.  To
  3302.               represent the text that you type, a computer must translate
  3303.               each letter to and from a number.  For all PC-compatible
  3304.               computers, the code used for this translation is called ASCII
  3305.               (American Standard Code for Information Interchange).  ASCII
  3306.               codes are used both for the characters you type and for the
  3307.               characters that are displayed on the screen.
  3308.  
  3309.               The original ASCII code has 128 values for upper and lower
  3310.               case letters, numerals, punctuation marks, and control codes.
  3311.               The control codes correspond to pressing the Ctrl key plus an
  3312.               alphabetic character.  Some control codes are also represented
  3313.               on the keyboard with such keys as Tab, Enter, Backspace, and
  3314.               Esc.  IBM, in its original PC, defined an additional 128
  3315.               extended ASCII codes for math symbols, international
  3316.               characters, the line characters used to draw boxes, and some
  3317.               miscellaneous symbols.  You can enter extended ASCII codes on
  3318.               the keyboard by holding down the Alt key while you type the
  3319.               code number on the numeric key pad.
  3320.  
  3321.               Do not confuse extended ASCII with extended key codes.  The
  3322.               latter include special codes that the computer generates when
  3323.               you press a function key, cursor key, or Alt plus a letter.
  3324.               Those keys do not have any representation in either the ASCII
  3325.               or extended ASCII code systems.  Another set of key codes,
  3326.               called scan codes, is discussed in the section on the keyboard
  3327.               below.
  3328.  
  3329.               Appendix B on page 325 has a complete list of ASCII, extended
  3330.               ASCII, and extended key codes.
  3331.  
  3332.  
  3333.           The Keyboard
  3334.  
  3335.               The original IBM PC, PC/XT, and virtually all XT-compatible
  3336.               computers use an 83-key keyboard with 10 function keys.  The
  3337.               earliest PC/AT computer and compatibles added an 84th key,
  3338.               called SysReq, but left the rest of the keyboard the same.
  3339.               Most 80286, 386, and 486 computers now use an "enhanced"
  3340.               keyboard with 101 or more keys, including 12 or more function
  3341.               keys.
  3342.  
  3343.               When you press a single key or a key combination, the computer
  3344.               translates the keystroke into two numbers.  For all
  3345.               alphabetic, numeric, and punctuation keys, the Tab, Enter,
  3346.               Backspace, Esc keys and Ctrl plus an alphabetic key, these
  3347.  
  3348.  
  3349.           ___________________________________________________________________
  3350.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  51
  3351.  
  3352.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3353.           ___________________________________________________________________
  3354.  
  3355.  
  3356.               numbers are an ASCII code plus a scan code.  The ASCII code
  3357.               represents the key's meaning; the scan code identifies which
  3358.               specific key was pressed.  For example, many keyboards have
  3359.               two plus [+] keys, one above the equal sign and one on the
  3360.               numeric keypad.  Both generate the same ASCII code, but they
  3361.               generate different scan codes.
  3362.  
  3363.               Keys which are not represented by ASCII codes are translated
  3364.               to an ASCII 0 plus an extended key code.  These keys include
  3365.               the function keys, the cursor keys, and Alt plus a key.  The
  3366.               extended key code for a key is generally the same as the scan
  3367.               code for that key.
  3368.  
  3369.               Some keys, like the Alt, Ctrl, and Shift by themselves or in
  3370.               combination with each other, plus the Print Screen, SysReq,
  3371.               Scroll Lock, Pause, Break, Num Lock, and Caps Lock do not have
  3372.               any code representations at all.  The computer performs
  3373.               special actions automatically when you press these keys (for
  3374.               example, it switches your keyboard into Caps Lock mode when
  3375.               you press the Caps Lock key), and does not report the
  3376.               keystrokes to whatever program is running unless the program
  3377.               has been written specially to accept them.
  3378.  
  3379.               It is up to the computer to smooth over the differences
  3380.               between the different keyboards.  That is part of the reason
  3381.               why not all keyboards can be used with all computers.
  3382.  
  3383.               Appendix B has a complete list of ASCII and scan codes of each
  3384.               of the keys on your keyboard.
  3385.  
  3386.  
  3387.           Video
  3388.  
  3389.               4DOS is a "character-based" program, which means that it works
  3390.               in text mode on your computer.  In text mode, the screen
  3391.               displays text in a single font, but cannot mix fonts or
  3392.               display graphics.  4DOS can run graphics programs which change
  3393.               your screen to graphics mode, but the screen must be returned
  3394.               to text mode whenever 4DOS is active.  In the early days of
  3395.               the IBM PC, text mode was a single, simple video operating
  3396.               environment.  Today, advanced video boards and video software
  3397.               have created a wide range of text modes.
  3398.  
  3399.               The original IBM PC monochrome and CGA color video cards can
  3400.               display 80 columns and 25 rows of text.  Newer, advanced video
  3401.               systems normally run in this 80 x 25 display mode but can also
  3402.               display more columns and rows.  For example, EGA video cards
  3403.               can display 43 rows of text and VGA video cards can display 50
  3404.  
  3405.  
  3406.           ___________________________________________________________________
  3407.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  52
  3408.  
  3409.                                                  CHAPTER 4 / GENERAL CONCEPTS
  3410.           ___________________________________________________________________
  3411.  
  3412.  
  3413.               rows.  With special driver programs, a VGA can display 60 rows
  3414.               or more and up to 132 columns of text.  Each of these
  3415.               different screen configurations is a different text mode.
  3416.  
  3417.               4DOS supports whatever number of rows and columns of text you
  3418.               decide to use.  It doesn't have commands to switch from one
  3419.               screen size to another -- you will need to use the software
  3420.               that came with your computer or video board to do that -- but
  3421.               it can read and work with the number of rows and columns on
  3422.               your screen.
  3423.  
  3424.  
  3425.           ANSI Drivers
  3426.  
  3427.               Every version of DOS includes a program called ANSI.SYS.  This
  3428.               program lets you use text colors other than drab white on
  3429.               black, redefine keys, and control screen output.  Commercial
  3430.               ANSI drivers are available as replacements for ANSI.SYS.  The
  3431.               commercial programs usually include many new features, boost
  3432.               screen display speed dramatically, and support text displays
  3433.               that have more than 80 columns and 25 lines.
  3434.  
  3435.               4DOS automatically determines whether you have an ANSI driver
  3436.               installed.  If you do, 4DOS will use the driver to clear the
  3437.               screen and set screen colors.
  3438.  
  3439.               Several 4DOS commands provide replacements for traditional
  3440.               ANSI.SYS commands.  For example, 4DOS has commands to set the
  3441.               screen colors and display text in specific colors.  These
  3442.               commands are easier to understand and use than traditional
  3443.               ANSI.SYS control sequences.  Some of these commands manipulate
  3444.               screen colors directly.  Others use an ANSI driver if one is
  3445.               installed, but save you the work of figuring out complex ANSI
  3446.               control sequences.  Any special interaction between 4DOS
  3447.               commands and the ANSI.SYS driver is described in the
  3448.               documentation for each command.
  3449.  
  3450.  
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.           ___________________________________________________________________
  3464.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  53
  3465.  
  3466.                                                        CHAPTER 5 / USING 4DOS
  3467.           ___________________________________________________________________
  3468.  
  3469.  
  3470.  
  3471.           CHAPTER 5 / USING 4DOS
  3472.  
  3473.  
  3474.           4DOS is both a collection of commands and a set of features which
  3475.           make your computer easier to use.  The commands are explained in
  3476.           the Command Reference section which begins on page 162.  This
  3477.           section of the manual primarily explains each of the 4DOS features
  3478.           that are not directly related to individual commands.
  3479.  
  3480.           Most of the features described in this section are easy to use, but
  3481.           a few are more technical in nature.  Such features are marked with
  3482.           a ## next to the feature name or the paragraph which describes the
  3483.           feature's operation.
  3484.  
  3485.           As you read through this section, we urge you to experiment with
  3486.           the features that catch your interest and pass over any which seem
  3487.           too complicated.  Come back to this section as you gain expertise
  3488.           with 4DOS, and you will probably discover that the more complex
  3489.           features will seem easy and very useful.  4DOS doesn't require that
  3490.           you learn any more than you want, and even if you are a computer
  3491.           novice, you'll find some features that will interest you
  3492.           immediately.
  3493.  
  3494.           If you come across terms or concepts in this chapter that you are
  3495.           unsure about, refer to Chapter 4 / General Concepts, the Glossary
  3496.           on page 342, or the Index.
  3497.  
  3498.  
  3499.           At the Command Line
  3500.  
  3501.               4DOS displays a c:\> prompt when it is waiting for you to
  3502.               enter a command.  (The actual text depends on the current
  3503.               drive and directory, as well as your PROMPT settings.)  This
  3504.               is called the command line and the prompt is 4DOS's way of
  3505.               asking you to enter a command, an alias or batch file name, or
  3506.               the instructions necessary to begin an application program.
  3507.  
  3508.               This section of the manual explains the 4DOS features that
  3509.               will help you while you are typing in commands, and how 4DOS
  3510.               interprets keystrokes entered at the command line.  The
  3511.               keystrokes discussed here are the ones 4DOS normally uses.  If
  3512.               you prefer using different keystrokes to perform these
  3513.               functions, you can reassign virtually all 4DOS keystrokes with
  3514.               keystroke directives in the 4DOS.INI configuration file (see
  3515.               page 118).
  3516.  
  3517.  
  3518.  
  3519.  
  3520.           ___________________________________________________________________
  3521.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  54
  3522.  
  3523.                                                        CHAPTER 5 / USING 4DOS
  3524.           ___________________________________________________________________
  3525.  
  3526.  
  3527.               Command Line Editing
  3528.  
  3529.               The 4DOS command line works like a single-line word processor,
  3530.               allowing you to edit any part the command line at any time
  3531.               before you press Enter to execute the command, or Esc to erase
  3532.               it.  4DOS extends the command line to a maximum of 255
  3533.               characters, and allows you to edit the command line even when
  3534.               it exceeds the width of your screen.
  3535.  
  3536.               4DOS recognizes the following editing keys when you are typing
  3537.               a command (the words Ctrl and Shift mean to press the Ctrl
  3538.               [Control] or Shift key together with the other key named):
  3539.  
  3540.               Cursor Movement:
  3541.  
  3542.                     Left arrow       Move the cursor left one character.
  3543.                     Right arrow      Move the cursor right one character.
  3544.                     Ctrl-Left arrow  Move the cursor left one word.
  3545.                     Ctrl-Right arrow Move the cursor right one word.
  3546.                     Home             Move the cursor to the beginning of the
  3547.                                      line.
  3548.                     End              Move the cursor to the end of the line.
  3549.  
  3550.               Insert and Delete:
  3551.                     Ins              Toggle between insert and overtype
  3552.                                      mode.
  3553.                     Del              Delete the character at the cursor.
  3554.                     Backspace        Delete the character to the left of the
  3555.                                      cursor.
  3556.                     Ctrl-L           Delete the word or partial word to the
  3557.                                      left of the cursor.
  3558.                     Ctrl-R or
  3559.                     Ctrl-Backspace   Delete the word or partial word to the
  3560.                                      right of the cursor.
  3561.                     Ctrl-Home        Delete from the beginning of the line
  3562.                                      to the cursor.
  3563.                     Ctrl-End         Delete from the cursor to the end of
  3564.                                      the line.
  3565.                     Esc              Delete the entire line.
  3566.                     Ctrl-C or
  3567.                     Ctrl-Break       Cancel the command.
  3568.                     Enter or Return  Execute the command line.
  3569.  
  3570.            ## Sometimes you may need to have 4DOS interpret a keystroke
  3571.               literally and place it on the command line instead of
  3572.               performing the usual action listed above.  For example,
  3573.               suppose you have a program that requires a Ctrl-R character on
  3574.               its command line.  Normally you couldn't type this keystroke
  3575.  
  3576.  
  3577.           ___________________________________________________________________
  3578.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  55
  3579.  
  3580.                                                        CHAPTER 5 / USING 4DOS
  3581.           ___________________________________________________________________
  3582.  
  3583.  
  3584.               at the 4DOS prompt, because 4DOS would interpret it as a
  3585.               "Delete word right" command.
  3586.  
  3587.               To get around this problem, use the special keystroke Alt-255.
  3588.               You enter Alt-255 by holding down the Alt key while you type
  3589.               255 on the numeric keypad, then releasing the Alt key (you
  3590.               must use the number keys on the numeric pad; the row of keys
  3591.               at the top of your keyboard won't work).  When 4DOS sees the
  3592.               Alt-255, it interprets the next keystroke literally and places
  3593.               it on the command line, ignoring any special meaning it would
  3594.               normally have as a 4DOS command line editing or history
  3595.               keystroke.  You can use Alt-255 to suppress the normal meaning
  3596.               of command line editing keystrokes even if they have been
  3597.               reassigned with key mapping directives in 4DOS.INI (see page
  3598.               118), and Alt-255 itself can be reassigned with the
  3599.               CommandEscape directive.
  3600.  
  3601.  
  3602.               Command History and Recall
  3603.  
  3604.               Each time you execute a command, 4DOS saves the command line
  3605.               in a command history list.  4DOS lets you display the saved
  3606.               commands, search the list, modify commands, and rerun
  3607.               commands.
  3608.  
  3609.               The simplest use of the command history list is to repeat a
  3610.               command exactly.  For example, you might enter the command
  3611.  
  3612.                    c:\> dir b:*.wks;*.doc
  3613.  
  3614.               to see some of the files on drive B.  You might move some new
  3615.               files to drive B and then want to repeat the DIR command.
  3616.               Just press the Up Arrow key repeatedly to scan back through
  3617.               the history list.  When the DIR command appears, press Enter
  3618.               to execute it again.
  3619.  
  3620.               After you have found a command, you can edit it before
  3621.               pressing Enter.  You will appreciate this feature when you
  3622.               have to execute a series of commands that differ only slightly
  3623.               from each other.
  3624.  
  3625.               The history list is "circular".  If you move to the last
  3626.               command in the list and then press the down arrow one more
  3627.               time, you'll see the first command in the list.  Similarly, if
  3628.               you move to the first command in the list ]and then press the
  3629.               up arrow one more time, you'll see the last command in the
  3630.               list.
  3631.  
  3632.  
  3633.  
  3634.           ___________________________________________________________________
  3635.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  56
  3636.  
  3637.                                                        CHAPTER 5 / USING 4DOS
  3638.           ___________________________________________________________________
  3639.  
  3640.  
  3641.               You can have 4DOS search the command history list to find a
  3642.               previous command quickly using command completion.  Just enter
  3643.               the first few characters of the command you want to find and
  3644.               press Up Arrow.  You only need to enter enough characters to
  3645.               identify the command that you want to find.  For example, to
  3646.               find the DIR command, enter DI and then press Up Arrow.  If
  3647.               you press the Up Arrow key a second time, 4DOS will display
  3648.               the next command that matches.  4DOS will beep if there are no
  3649.               matching commands.  The search process stops as soon as you
  3650.               type one of the 4DOS editing keys, whether or not the line is
  3651.               changed.  At that point, the line you're viewing becomes the
  3652.               new line to match if you press Up Arrow again.
  3653.  
  3654.               You can specify the size of the command history list with the
  3655.               History directive in 4DOS.INI (see page 125).  When the list
  3656.               is full, 4DOS discards the oldest commands to make room for
  3657.               new ones.  You can also use the HistMin directive in 4DOS.INI
  3658.               to enable or disable history saves and to specify the shortest
  3659.               command line that 4DOS will save (see page 129).
  3660.  
  3661.               You can prevent 4DOS from saving a command line by beginning
  3662.               it with an at-sign [@].
  3663.  
  3664.               Command History Keys:
  3665.  
  3666.                     Up Arrow         Recall the previous (or most recent)
  3667.                                      command, or the most recent command
  3668.                                      that matches a partial command line.
  3669.                     Down Arrow       Recall the next (or oldest) command, or
  3670.                                      the oldest command that matches a
  3671.                                      partial command line.
  3672.                     F3               Fill in the rest of the command line
  3673.                                      from the previous command, beginning at
  3674.                                      the current cursor position.
  3675.                     Ctrl-D           Delete the currently displayed history
  3676.                                      list entry, erase the command line, and
  3677.                                      display the previous matching history
  3678.                                      list entry.
  3679.                     Ctrl-E           Display the last entry in the history
  3680.                                      list.
  3681.                     Ctrl-K           Save the current command line in the
  3682.                                      history list without executing it, and
  3683.                                      then clear the command line
  3684.                     @                As the first character in a line:  Do
  3685.                                      not save the current line in the
  3686.                                      history list when it is executed, and
  3687.                                      do not store it in the CMDLINE
  3688.                                      environment variable..
  3689.  
  3690.  
  3691.           ___________________________________________________________________
  3692.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  57
  3693.  
  3694.                                                        CHAPTER 5 / USING 4DOS
  3695.           ___________________________________________________________________
  3696.  
  3697.  
  3698.               Use F3 when your new command is different from your old one by
  3699.               just a character or two at the beginning.  For example,
  3700.               suppose you want to execute a DIR on several file names then
  3701.               use DEL to delete those same files.  After the DIR is complete
  3702.               type DEL and press F3; the rest of the command line will be
  3703.               completed for you.  Check that it's correct, and then press
  3704.               Enter to delete the files.  F3 also retrieves the entire
  3705.               previous command (like up-arrow) if nothing has been typed on
  3706.               the line.
  3707.  
  3708.               Use Ctrl-E to "get your bearings" by returning to the end of
  3709.               the list if you've scrolled around so much that you aren't
  3710.               sure where you are any more.
  3711.  
  3712.               Use Ctrl-K to save some work when you've typed a long command
  3713.               and then realize that you weren't quite ready.  For example,
  3714.               if you forget to change directories and notice it after a
  3715.               command is typed or mostly typed, but before you press Enter,
  3716.               just press Ctrl-K to save the command without executing it.
  3717.               Use the CD or CDD command to change to the right directory,
  3718.               press up-arrow twice to retrieve the command you saved, make
  3719.               any final changes to it, and press Enter to execute it.
  3720.  
  3721.  
  3722.               Command History Window
  3723.  
  3724.               You can also view the command history in a scrollable history
  3725.               window, and select the command to modify or re-execute from
  3726.               those displayed in the window.  To activate the history window
  3727.               press PgUp or PgDn at the command line.  4DOS will display a
  3728.               window in the upper right corner of the screen, with the
  3729.               command you most recently executed marked with a highlight.
  3730.               (If you just finished re-executing a command from the history,
  3731.               then the next command in sequence will be highlighted.)
  3732.  
  3733.               You can scroll the history window up and down one line at a
  3734.               time with Up Arrow and Down Arrow, and one page (screen) at a
  3735.               time with PgUp and PgDn.  The display is not circular as it is
  3736.               at the prompt, it has fixed beginning and end points.  Home or
  3737.               Ctrl-PgUp will go to the beginning of the history, and End or
  3738.               Ctrl-PgDn will go to the end.  The Ctrl-D (delete from
  3739.               history) key works within the history as it does at the
  3740.               command line.
  3741.  
  3742.               Once you have selected a command in the history window, press
  3743.               Enter to execute it immediately, or Ctrl-Enter to move the
  3744.               line to the prompt for editing (you can not edit the line
  3745.               directly in the history window).
  3746.  
  3747.  
  3748.           ___________________________________________________________________
  3749.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  58
  3750.  
  3751.                                                        CHAPTER 5 / USING 4DOS
  3752.           ___________________________________________________________________
  3753.  
  3754.  
  3755.               You can bring up a "filtered" history window by typing some
  3756.               characters on the command line, then pressing PgUp or PgDn.
  3757.               Only those commands matching the typed characters will be
  3758.               displayed in the window.
  3759.  
  3760.               You can control the position and size of the history window
  3761.               with directives in 4DOS.INI (see page 129).  You can also
  3762.               change the keys used in the window with key mapping directives
  3763.               in 4DOS.INI (see page 134).
  3764.  
  3765.               Command History Window:
  3766.  
  3767.                     PgUp or PgDn     (from the command line) Open the
  3768.                                      command history window.
  3769.                     Up Arrow         Scroll the display up one line.
  3770.                     Down Arrow       Scroll the display down one line.
  3771.                     PgUp             (inside the window) Scroll the display
  3772.                                      up one page.
  3773.                     PgDn             (inside the window) Scroll the display
  3774.                                      down one page.
  3775.                     Ctrl-PgUp or HomeGo to the beginning of the history
  3776.                                      list.
  3777.                     Ctrl-PgDn or End Go to the end of the history list.
  3778.                     Ctrl-D           Delete the selected line from the
  3779.                                      history list.
  3780.                     Enter            Execute the selected line.
  3781.                     Any other key    Move the selected line to the command
  3782.                                      line for editing, then perform the
  3783.                                      key's normal action.
  3784.  
  3785.  
  3786.               Filename Completion
  3787.  
  3788.               4DOS's filename completion can help you by filling in a
  3789.               complete file name on the command line when you only remember
  3790.               part of the name.  For example, suppose you want to copy a
  3791.               file.  You know that its name begins AU but you can't remember
  3792.               the rest of the name.  Type
  3793.  
  3794.                    c:\> copy au
  3795.  
  3796.               and then press the Tab key or F9 key.  4DOS will search the
  3797.               current directory for filenames that begin AU and insert the
  3798.               first one onto the command line in place of the AU that you
  3799.               typed.
  3800.  
  3801.               If 4DOS found the file that you want, simply complete the
  3802.               command.  If it didn't find the file that you were looking
  3803.  
  3804.  
  3805.           ___________________________________________________________________
  3806.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  59
  3807.  
  3808.                                                        CHAPTER 5 / USING 4DOS
  3809.           ___________________________________________________________________
  3810.  
  3811.  
  3812.               for, press Tab again to substitute the next filename that
  3813.               begins with AU.  When there are no more filenames that match
  3814.               your pattern, 4DOS will beep each time you press Tab or F9.
  3815.  
  3816.               If you go past the filename that you want, press Shift-Tab or
  3817.               F8 to back up and 4DOS will return to the previous matching
  3818.               filename.  After you back up to the first filename, 4DOS will
  3819.               beep each time you press Shift-Tab.
  3820.  
  3821.               If you want to enter more than one matching filename on the
  3822.               same command line, press F10 when each desired name appears.
  3823.               4DOS will keep that name and place the next matching filename
  3824.               after it on the command line.  You can then use Tab (or F8)
  3825.               and Shift-Tab (or F9) to move through the remaining matching
  3826.               files.
  3827.  
  3828.               The pattern you use for matching may contain any valid
  3829.               filename characters, as well as wildcard characters and 4DOS's
  3830.               extended wildcards (see page 71).  For example, you can copy
  3831.               the first matching .TXT file by typing
  3832.  
  3833.                    c:\> copy *.txt
  3834.  
  3835.               and then pressing Tab.
  3836.  
  3837.               If you don't specify part of a filename before pressing Tab,
  3838.               4DOS will use *.* as the matching pattern.  If you type a
  3839.               filename without an extension, 4DOS will add *.* to the name.
  3840.               It will also place a "*" after a partial extension.  If you
  3841.               are typing a group of file names in an include list (see page
  3842.               74), 4DOS will use the part of the include list at the cursor
  3843.               as the pattern to match.
  3844.  
  3845.               When filename completion is used at the start of the command
  3846.               line, 4DOS will only try to match directories, executable
  3847.               files (.COM, .EXE, .BTM, and .BAT), and files with executable
  3848.               extensions, since these are the only file names that it makes
  3849.               sense to use at the start of a command.  If a directory is
  3850.               found a "\" will be appended to enable an automatic directory
  3851.               change (see below).
  3852.  
  3853.               If you would rather select files from a list of matching file
  3854.               names, see the SELECT command on page 286.
  3855.  
  3856.  
  3857.  
  3858.  
  3859.  
  3860.  
  3861.  
  3862.           ___________________________________________________________________
  3863.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  60
  3864.  
  3865.                                                        CHAPTER 5 / USING 4DOS
  3866.           ___________________________________________________________________
  3867.  
  3868.  
  3869.               Filename Completion Keys:
  3870.  
  3871.                     F8 or Shift-Tab  Get the previous matching filename.
  3872.                     F9 or Tab        Get the next matching filename.
  3873.                     F10              Keep the current matching filename and
  3874.                                      display the next matching name
  3875.                                      immediately after the current one.
  3876.  
  3877.  
  3878.               Multiple Commands
  3879.  
  3880.               At times, you probably know the next two or three commands
  3881.               that you want 4DOS to execute.  Instead of waiting for each
  3882.               one to finish before you type the next, you can type them all
  3883.               on the same command line, separated by a caret [^].  For
  3884.               example, if you know you want to copy all of your .TXT files
  3885.               to drive A: and then run CHKDSK to be sure that drive A's file
  3886.               structure is in good shape, you can type the following command
  3887.               line:
  3888.  
  3889.                    c:\> copy *.txt a: ^ chkdsk a:
  3890.  
  3891.               If you don't like using the caret as the command separator,
  3892.               you can pick another character using the SETDOS command (see
  3893.               page 294) or the CommandSep directive in 4DOS.INI (see page
  3894.               128).
  3895.  
  3896.               You may put as many commands on the command line as you wish,
  3897.               as long as the total length of the command line does not
  3898.               exceed 255 characters.
  3899.  
  3900.               You can use multiple commands in batch files (see page 98) and
  3901.               alias definitions (see page 96) as well as from the command
  3902.               line.
  3903.  
  3904.  
  3905.               Automatic Directory Changes
  3906.  
  3907.               4DOS's automatic directory change feature gives you a quick
  3908.               method for changing directories.  You can use an automatic
  3909.               directory change in place of the CD or CDD command.  To do so,
  3910.               simply type the name of the directory you want to change to at
  3911.               the prompt, with a backslash [\] at the end, and 4DOS will
  3912.               switch to that directory.  For example:
  3913.  
  3914.                    c:\> 4dos\
  3915.                    c:\4dos>
  3916.  
  3917.  
  3918.  
  3919.           ___________________________________________________________________
  3920.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  61
  3921.  
  3922.                                                        CHAPTER 5 / USING 4DOS
  3923.           ___________________________________________________________________
  3924.  
  3925.  
  3926.               This feature can make directory changes very simple when it's
  3927.               combined with the CDPATH environment variable (see page 116).
  3928.               CDPATH includes a list of directories for the CD and CDD
  3929.               commands to search if the directory you name does not exist
  3930.               below the current directory.  Automatic directory changes use
  3931.               CDPATH as well.  For example, suppose CDPATH is set to
  3932.               C:\;D:\;E:\, and the directory WIN exists on drive E:.  You
  3933.               can change to this directory with a single word on the command
  3934.               line:
  3935.  
  3936.                    c:\4dos> win\
  3937.                    e:\win>
  3938.  
  3939.               In executing the command shown above, 4DOS first looks for a
  3940.               WIN subdirectory of the current directory, i.e. C:\4DOS\WIN.
  3941.               If no such directory exists it looks for a WIN subdirectory in
  3942.               every directory in the CDPATH list, and changes to the first
  3943.               one it finds.
  3944.  
  3945.               Internally, automatic directory changes use the CDD command;
  3946.               the text before the backslash can be anything that could be
  3947.               included after CDD on the command line, except "-".  Arguments
  3948.               like "...." are allowed.  Automatic directory changes save the
  3949.               current directory, so it can be recalled with a "CDD -" or "CD
  3950.               -" command.  For more information on directory changes see CD
  3951.               on page 185 and CDD on page 187.
  3952.  
  3953.  
  3954.               Temporarily Disabling Aliases
  3955.  
  3956.               At times, you may want to temporarily disable an alias that
  3957.               you have defined.  You may have an alias that changes the
  3958.               defaults of a particular command, for example, and want to run
  3959.               the unmodified version of the command.  To do so, precede the
  3960.               command name with an asterisk [*].  For example, if you have
  3961.               an alias for DIR which displays directories in 2-column paged
  3962.               mode by default, you can use the following command to display
  3963.               a directory in the normal single-column, non-paged mode:
  3964.  
  3965.                    c:\> *dir
  3966.  
  3967.  
  3968.               Command Line Help
  3969.  
  3970.               4DOS includes a complete help program (called 4HELP.EXE).  The
  3971.               help system includes complete help for all 4DOS internal
  3972.               commands, all standard DOS external commands, and many 4DOS
  3973.  
  3974.  
  3975.  
  3976.           ___________________________________________________________________
  3977.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  62
  3978.  
  3979.                                                        CHAPTER 5 / USING 4DOS
  3980.           ___________________________________________________________________
  3981.  
  3982.  
  3983.               features.  It is indexed and fully cross-referenced, so you
  3984.               can move easily among related commands.
  3985.  
  3986.               You can start the 4DOS help system to get help for any 4DOS or
  3987.               DOS command in several different ways.
  3988.  
  3989.               If you type HELP at the 4DOS prompt, a list of all help topics
  3990.               will be displayed.  Move the cursor bar to the topic you want
  3991.               using a mouse or the arrow keys, and press Enter to see help
  3992.               on that topic.
  3993.  
  3994.               If you type HELP followed by a topic on the command line, 4DOS
  3995.               will skip the opening help screen and go directly to that
  3996.               topic.  For example, if you need help with the COPY command,
  3997.               you can type:
  3998.  
  3999.                    help copy
  4000.  
  4001.               If you press F1 at the 4DOS prompt, 4DOS will display the list
  4002.               of all help topics just as if you had entered the HELP
  4003.               command.  If you have already typed part or all of a command
  4004.               on the line, 4DOS will provide "context-sensitive" help by
  4005.               using the first word on the line as a help topic.  If it's a
  4006.               valid topic, you will see help for that topic automatically;
  4007.               if not, you will see the list of all help topics and you can
  4008.               pick the topic you want.  For example, if you press F1 after
  4009.               entering each of the command lines shown below you will get
  4010.               the display indicated:
  4011.  
  4012.                    c:\>                      List of help topics
  4013.                    c:\> copy *.* a:          Help on COPY
  4014.                    c:\> c:\util\map          List of help topics
  4015.  
  4016.               If you type the name of any 4DOS internal command at the 4DOS
  4017.               prompt, followed by a slash and a question mark [/?] like
  4018.               this:
  4019.  
  4020.                    copy /?
  4021.  
  4022.               then 4DOS will display help for the command in a "quick-
  4023.               reference" style.  Output from a /? display may be redirected
  4024.               with > or >>.  The /? option may not work correctly if you
  4025.               havve redefined how the command operates with an alias.  In
  4026.               this case you may need to add an asterisk to the beginning of
  4027.               the command to prevent 4DOS from processing the alias:
  4028.  
  4029.                    alias copy copy /r
  4030.                    *copy /?
  4031.  
  4032.  
  4033.           ___________________________________________________________________
  4034.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  63
  4035.  
  4036.                                                        CHAPTER 5 / USING 4DOS
  4037.           ___________________________________________________________________
  4038.  
  4039.  
  4040.               /? will only access the 4DOS help system when you use it with
  4041.               a 4DOS internal command.  If you use it with an external
  4042.               command name, the external command will be executed and will
  4043.               interpret the /? parameter according to its own rules.  Some
  4044.               external commands, including MS-DOS 5.0 external utility
  4045.               programs,  do display help when run with a /? parameter, but
  4046.               this a characteristic of these commands and does not depend on
  4047.               4DOS.  Many other external commands do not have this feature.
  4048.  
  4049.               Once you've started the 4DOS help system with HELP or F1, you
  4050.               can use a standard set of keystrokes to navigate.  The table
  4051.               below gives a brief summary of keys you can use in the help
  4052.               topic list, and in a help text screen; for details see the
  4053.               topic -HELP- in the help system itself.  For details on mouse
  4054.               usage, see the topic -MOUSE- in the help system.
  4055.  
  4056.               Help topic list keys:
  4057.  
  4058.                     Arrow Keys       Move the highlight to a different
  4059.                                      topic.
  4060.                     Enter            Display help on the highlighted topic.
  4061.                     Esc              Return to 4DOS.
  4062.                     Any other key    Attempt to match the characters typed
  4063.                                      with one of the names in the topic
  4064.                                      list.
  4065.  
  4066.               Help text screen keys:
  4067.                     Up Arrow         Scroll up one line in the display.
  4068.                     Down Arrow       Scroll down one line in the display.
  4069.                     PgUp             Scroll up one page in the display.
  4070.                     PgDn             Scroll down one page in the display.
  4071.                     Left Arrow       Move the cross-reference highlight to
  4072.                                      the previous item.
  4073.                     Right Arrow      Move the cross-reference highlight to
  4074.                                      the next item.
  4075.                     Enter            Switch to the topic shown by the
  4076.                                      highlighted cross-reference item.
  4077.                     Esc              Return to the topic list, or back to
  4078.                                      4DOS if this topic was displayed
  4079.                                      directly without using the topic list.
  4080.                     F1               Go to the topic list in order to select
  4081.                                      a new topic.
  4082.                     Alt-N
  4083.                       or Ctrl-Right  View the next topic in the topic list.
  4084.                     Alt-P
  4085.                       or Ctrl-Left   View the previous topic in the topic
  4086.                                      list.
  4087.                     Alt-F1           View the previously displayed topic.
  4088.  
  4089.  
  4090.           ___________________________________________________________________
  4091.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  64
  4092.  
  4093.                                                        CHAPTER 5 / USING 4DOS
  4094.           ___________________________________________________________________
  4095.  
  4096.  
  4097.                     Alt-X            Return directly to 4DOS without
  4098.                                      restoring the original screen contents.
  4099.                     Ctrl-P           Print the text for the current topic on
  4100.                                      LPT1.
  4101.  
  4102.               The help system normally restores the screen when exiting.
  4103.               Use Alt-X to leave a page of help text on the screen so you
  4104.               can refer to it.  You can use Ctrl-P to print the topic you
  4105.               are viewing.  Your printer must be turned on and ready before
  4106.               pressing Ctrl-P.
  4107.  
  4108.  
  4109.           Input and Output
  4110.  
  4111.               4DOS commands and many programs get their input from the
  4112.               computer's standard input device and send their output to the
  4113.               standard output device.  Some programs also send special
  4114.               messages to the standard error device.  Normally, the keyboard
  4115.               is used for standard input and the video screen for both
  4116.               standard output and standard error.  But you can temporarily
  4117.               change these devices for special tasks.
  4118.  
  4119.               For example, suppose you want a printed list of the files in a
  4120.               directory.  If you change the standard output to the printer
  4121.               and issue a DIR command, the task is easy.  DIR prints to
  4122.               standard output, and you have redirected standard output to
  4123.               the printer, so the DIR command prints filenames instead of
  4124.               displaying them on the screen.  You can just as easily send
  4125.               the output of DIR (or any other command) to a file or a serial
  4126.               port.
  4127.  
  4128.               4DOS has three methods of manipulating input and output:
  4129.               Redirection, Piping, and the Keystack.  All three are
  4130.               explained in this section.
  4131.  
  4132.               Redirection and piping affect the standard input, standard
  4133.               output, and standard error devices.  They do not work with
  4134.               application programs which read the keyboard hardware
  4135.               directly, or which write directly to the screen.
  4136.  
  4137.  
  4138.               Redirection
  4139.  
  4140.               Redirection replaces standard input, standard output, and
  4141.               standard error with another device like the printer or serial
  4142.               port, or with a file.  The redirection lasts for one command
  4143.               and then everything returns to normal.  You have to use some
  4144.  
  4145.  
  4146.  
  4147.           ___________________________________________________________________
  4148.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  65
  4149.  
  4150.                                                        CHAPTER 5 / USING 4DOS
  4151.           ___________________________________________________________________
  4152.  
  4153.  
  4154.               discretion when you use redirection with a device;  there is
  4155.               no way to get input from the printer, for example.
  4156.  
  4157.               In the descriptions below, filename means either the name of a
  4158.               file or of an appropriate device (PRN, LPT1, LPT2, or LPT3 for
  4159.               printers; COM1 to COM4 for serial ports; CON for the keyboard
  4160.               and screen; etc.).
  4161.  
  4162.               To use redirection, place the redirection symbol and filename
  4163.               at the end of the command line, after the command name and any
  4164.               parameters.  For example, to redirect the output of the DIR
  4165.               command to a file called DIRLIST, you could use a command line
  4166.               like this:
  4167.  
  4168.                    c:\> dir /b1 *.dat > dirlist
  4169.  
  4170.               You can use both input and output redirection for the same
  4171.               command, if both are appropriate:
  4172.  
  4173.                    c:\> sort < dirlist > dirlist.srt
  4174.  
  4175.               Here are the redirection options supported by 4DOS:
  4176.  
  4177.                    To get input from a file or device instead of from the
  4178.                    keyboard:
  4179.  
  4180.                         < filename
  4181.  
  4182.                    To redirect standard output to a file or device:
  4183.  
  4184.                         > filename
  4185.  
  4186.                    To redirect standard output and standard error to a file
  4187.                    or device:
  4188.  
  4189.                         >& filename
  4190.  
  4191.                    To redirect standard error only to a file or device:
  4192.  
  4193.                         >&> filename
  4194.  
  4195.               If you want to append output to the end of a file, replace the
  4196.               first ">" in the last three commands above with ">>" (use >>,
  4197.               >>&, and >>&>).
  4198.  
  4199.            ## When output is directed to a file with >, >&, or >&>, if the
  4200.               file already exists, it will be overwritten.  You can protect
  4201.  
  4202.  
  4203.  
  4204.           ___________________________________________________________________
  4205.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  66
  4206.  
  4207.                                                        CHAPTER 5 / USING 4DOS
  4208.           ___________________________________________________________________
  4209.  
  4210.  
  4211.               existing files by using the SETDOS /N1 command (see page 294)
  4212.               or the NoClobber directive in 4DOS.INI (see page 130).
  4213.  
  4214.            ## When output is appended to a file with >>, >>&, or >>&>, the
  4215.               file will be created if it doesn't already exist.  Setting
  4216.               NoClobber will also prevent the creation of a new file.  You
  4217.               can temporarily override the current setting of NoClobber by
  4218.               using an exclamation mark [!] after the redirection symbol.
  4219.               For example, to redirect the output of DIR to the file DIROUT,
  4220.               and allow overwriting of any existing file despite the
  4221.               NoClobber setting:
  4222.  
  4223.                    c:\> dir >! dirout
  4224.  
  4225.            ## 4DOS redirection is fully nestable.  For example, you can
  4226.               invoke a batch file and redirect all of its output to a file
  4227.               or device.  Output redirection on a command within the batch
  4228.               file will take effect for that command only; when the command
  4229.               is completed, output will revert to the redirected output file
  4230.               or device in use for the batch file as a whole.
  4231.  
  4232.            ## For another method of changing the standard input and output
  4233.               devices see CTTY on page 198.
  4234.  
  4235.  
  4236.               Piping
  4237.  
  4238.               You can also create a "pipe," which means sending the standard
  4239.               output of one command to the standard input of another
  4240.               command.  To send the standard output of command1 to the
  4241.               standard input of command2:
  4242.  
  4243.                    command1 | command2
  4244.  
  4245.               To send the standard output and standard error of command1 to
  4246.               the standard input of command2:
  4247.  
  4248.                    command1 |& command2
  4249.  
  4250.               For example, to take the output of the SET command (which
  4251.               displays a list of your environment variables and their
  4252.               values) and pipe it to the DOS SORT utility to generate a
  4253.               sorted list, you would use the command:
  4254.  
  4255.                    c:\> set | sort
  4256.  
  4257.               To do the same thing and then pipe the sorted list to 4DOS's
  4258.               LIST command for full-screen viewing (see page 255):
  4259.  
  4260.  
  4261.           ___________________________________________________________________
  4262.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  67
  4263.  
  4264.                                                        CHAPTER 5 / USING 4DOS
  4265.           ___________________________________________________________________
  4266.  
  4267.  
  4268.                    c:\> set | sort | list /s
  4269.  
  4270.            ## 4DOS creates one or two temporary files to hold the output of
  4271.               pipes.  The files are named P1.$00 and P2.$00.  By default,
  4272.               these files are stored in the root directory of the boot
  4273.               drive, but you can override this with either the TEMP4DOS or
  4274.               TEMP environment variable (see page 115).  The last character
  4275.               of the extension will change with the shell nesting level (0
  4276.               for the primary shell, 1 for the first secondary shell, and so
  4277.               on).
  4278.  
  4279.            ## The 4DOS commands TEE and Y (see pages 301 and 314) are "pipe
  4280.               fittings" which add more flexibility to pipes.
  4281.  
  4282.  
  4283.               Keystack
  4284.  
  4285.               The 4DOS Keystack overcomes two weaknesses of input
  4286.               redirection: many programs ignore standard input and read the
  4287.               keyboard directly, and input redirection doesn't end until the
  4288.               program or command terminates.  You can't, for example, use
  4289.               redirection to send the opening commands to a program and then
  4290.               type the rest of the commands yourself.  But the Keystack lets
  4291.               you do exactly that.
  4292.  
  4293.               The 4DOS Keystack, which is often used in batch files and
  4294.               aliases, sends keystrokes to an application program.  Once the
  4295.               Keystack is empty, the program will receive the rest of its
  4296.               input from the keyboard.  The Keystack is useful when you want
  4297.               a program to take certain actions automatically when it
  4298.               starts.
  4299.  
  4300.               The Keystack is invoked with the KEYSTACK command (see page
  4301.               250).  It depends on a small resident program called
  4302.               KSTACK.COM, which must be installed in your AUTOEXEC.BAT file
  4303.               (see page 114).  If you don't have KSTACK.COM installed, the
  4304.               KEYSTACK command will display an error message.  If you are
  4305.               using a multitasking system such as DESQView or Windows, see
  4306.               page 151 for information on loading KSTACK within a window.
  4307.  
  4308.               To place the letters, digits, and punctuation marks you would
  4309.               normally type for your program into the keystack, enclose them
  4310.               in double quotes:
  4311.  
  4312.                    c:\> keystack "myfile"
  4313.  
  4314.  
  4315.  
  4316.  
  4317.  
  4318.           ___________________________________________________________________
  4319.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  68
  4320.  
  4321.                                                        CHAPTER 5 / USING 4DOS
  4322.           ___________________________________________________________________
  4323.  
  4324.  
  4325.               Many other keys can be entered into the Keystack using their
  4326.               names.  This example puts the F1 key followed by the Enter key
  4327.               in the keystack:
  4328.  
  4329.                    c:\> keystack F1 Enter
  4330.  
  4331.               See the KEYSTACK command for details on how key names are
  4332.               entered and on using numeric key values along with or instead
  4333.               of key names.
  4334.  
  4335.               Some programs may require a delay between keystrokes.  You can
  4336.               insert a delay with the /W option, followed by a delay time in
  4337.               1/18-seconds.  To add a 1-second delay between the keystrokes
  4338.               in the previous example:
  4339.  
  4340.                    c:\> keystack F1 /W18 Enter
  4341.  
  4342.               Some programs clear all keystrokes from the keyboard buffer
  4343.               and then accept input.  Place a 0 (zero) in the keystack to
  4344.               tell such programs that the keyboard buffer is empty.  This
  4345.               example reports an empty keyboard buffer and then types
  4346.               myfile:
  4347.  
  4348.                    c:\> keystack 0 "myfile"
  4349.  
  4350.               Some programs require both the ASCII code and the key's scan
  4351.               code.  To put both together in the Keystack, multiply the scan
  4352.               code by  256, add the ASCII code, and use the resulting
  4353.               numeric value as an argument to KEYSTACK.  For example, the
  4354.               Enter key has a scan code of 28 and an ASCII code of 13.  The
  4355.               combined code is (28 * 256) + 13 = 7181.  To put the combined
  4356.               code for the Enter key on the keystack:
  4357.  
  4358.                    c:\> keystack 7181
  4359.  
  4360.               If a program has different uses for the similar keys on the
  4361.               regular keyboard and the numeric keypad, it will need combined
  4362.               codes.
  4363.  
  4364.               The following command creates an alias (see page 169) that
  4365.               will run a dBASE report called TIMEREP (it should be entered
  4366.               on one line):
  4367.  
  4368.                    c:\> alias drpt `keystack "use times index times" Enter
  4369.                         "report form timerep to print" Enter "quit" Enter
  4370.                          ^ dbase`
  4371.  
  4372.  
  4373.  
  4374.  
  4375.           ___________________________________________________________________
  4376.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  69
  4377.  
  4378.                                                        CHAPTER 5 / USING 4DOS
  4379.           ___________________________________________________________________
  4380.  
  4381.  
  4382.               This command creates an alias called DRPT which puts the
  4383.               following characters on the keystack:
  4384.  
  4385.                    the characters "use times index times"
  4386.                    the Enter key's code
  4387.                    the characters "report form timerep to print"
  4388.                    the Enter key's code
  4389.                    the characters "quit"
  4390.                    and one more Enter key
  4391.  
  4392.               The alias then runs the program dBASE which receives those
  4393.               characters just as if you had typed them.
  4394.  
  4395.               You may have to experiment with some programs to find the
  4396.               proper sequence of keystrokes.  Programs which bypass both DOS
  4397.               and the computer's BIOS, and read keystrokes directly from the
  4398.               keyboard hardware, will not accept input from the 4DOS
  4399.               Keystack.  Few programs fit into this category except memory-
  4400.               resident utilities.
  4401.  
  4402.               When you use the Keystack, remember that you must put the
  4403.               keystrokes into the Keystack before you run the program that
  4404.               will receive them.  The Keystack will hold the keystrokes
  4405.               until a program asks for them.
  4406.  
  4407.               See Appendix B on page 325 for a complete list of ASCII,
  4408.               extended key, and scan codes, and KEYSTACK on page 250 for
  4409.               more information.
  4410.  
  4411.  
  4412.           File Processing
  4413.  
  4414.               Most 4DOS commands (like COPY, DIR, etc.) and many external
  4415.               commands work on a file or a group of files.  Besides typing
  4416.               the exact name of the file you want to work with, you can use
  4417.               4DOS's shorthand forms of naming files:  Extended Parent
  4418.               Directory Names, Wildcards, Multiple Filenames, Include Lists,
  4419.               and Executable Extensions.  These four features are explained
  4420.               in this section.
  4421.  
  4422.               These features apply to 4DOS commands only, and generally can
  4423.               not be used to pass file names to external programs.  For
  4424.               example, 4DOS can understand the file name ...\FILE.DAT when
  4425.               it is used in an internal 4DOS command like COPY or MOVE.
  4426.               However your editor probably was not designed to support this
  4427.               extension to traditional DOS directory names, and is likely to
  4428.               give an error message if you try to pass it such a name.
  4429.  
  4430.  
  4431.  
  4432.           ___________________________________________________________________
  4433.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  70
  4434.  
  4435.                                                        CHAPTER 5 / USING 4DOS
  4436.           ___________________________________________________________________
  4437.  
  4438.  
  4439.               Remember throughout this section that a filename is a base
  4440.               name of 1 to 8 characters, optionally followed by an extension
  4441.               which is a period [.] and 1 to 3 more characters.
  4442.  
  4443.  
  4444.               Extended Parent Directory Names
  4445.  
  4446.               4DOS allows you to extend the traditional DOS ".." syntax for
  4447.               naming the parent directory, by adding additional [.]
  4448.               characters.  Each additional [.] represents an additional
  4449.               directory level above the current directory.  For example, to
  4450.               copy the file LETTERS.DAT from the directory C:\DATA to drive
  4451.               A:, while you are in a directory further down in the directory
  4452.               tree:
  4453.  
  4454.                    C:\DATA\FINANCE\JANUARY>copy ...\LETTERS.DAT A:
  4455.  
  4456.  
  4457.               Wildcards
  4458.  
  4459.               Wildcards let you specify a file or group of files by typing a
  4460.               partial filename.  4DOS scans the appropriate directory to
  4461.               find all of the files that match the partial name you have
  4462.               specified.
  4463.  
  4464.               Most 4DOS commands accept filenames with wildcards anywhere
  4465.               that a full filename can be used.  4DOS recognizes 2 wildcard
  4466.               characters, the asterisk [*] and the question mark [?], plus a
  4467.               special method of specifying a range of permissible
  4468.               characters.
  4469.  
  4470.               An asterisk [*] in a filename means "any zero or more
  4471.               characters in this position."  For example, this command will
  4472.               display a list of all files in the current directory,
  4473.               regardless of the length of each file's name:
  4474.  
  4475.                    c:\> dir *.*
  4476.  
  4477.               If you want to see all of the files with a .TXT extension, you
  4478.               could type this:
  4479.  
  4480.                    c:\> dir *.txt
  4481.  
  4482.               If you know that the file you are looking for has a base name
  4483.               that begins with ST and an extension that begins with .D, you
  4484.               can find it this way.  Filenames such as STATE.DAT,
  4485.               STEVEN.DOC, and ST.D will all be displayed:
  4486.  
  4487.  
  4488.  
  4489.           ___________________________________________________________________
  4490.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  71
  4491.  
  4492.                                                        CHAPTER 5 / USING 4DOS
  4493.           ___________________________________________________________________
  4494.  
  4495.  
  4496.                    c:\> dir st*.d*
  4497.  
  4498.               With 4DOS, you can also use the asterisk to match filenames
  4499.               with specific letters somewhere inside the name.  The
  4500.               following example will display any file with a .TXT extension
  4501.               that has the letters AM together anywhere inside its base
  4502.               name.  It will, for example, display AMPLE.TXT, STAMP.TXT,
  4503.               CLAM.TXT, and AM.TXT:
  4504.  
  4505.                    c:\> dir *am*.txt
  4506.  
  4507.               A question mark [?] matches any single filename character.
  4508.               Also, DOS automatically extends all base names to 8 characters
  4509.               and all extensions to 3 characters by adding blanks at the end
  4510.               of the names, if necessary.  The question mark wildcard will
  4511.               match one of these blanks as well as a normal character.  For
  4512.               example, if you have files called LETTER.DOC, LETTER1.DOC, and
  4513.               LETTERA.DOC, this command will display all three names:
  4514.  
  4515.                    c:\> dir letter?.doc
  4516.  
  4517.               You can put the question mark anywhere in a filename and use
  4518.               as many question marks as you need.  The following example
  4519.               will display files with names like LETTER.DOC and LATTER.DAT,
  4520.               and LITTER.DU:
  4521.  
  4522.                    c:\> dir l?tter.d??
  4523.  
  4524.               The use of an asterisk wildcard before other characters, and
  4525.               of the character ranges discussed below, is unique to 4DOS.
  4526.               These wildcards work only with 4DOS internal commands, not
  4527.               with external programs that accept file names and wildcards,
  4528.               unless such programs have been written especially to parallel
  4529.               4DOS's features.
  4530.  
  4531.            ## In some cases, the question mark wildcard may be too general.
  4532.               You can also tell 4DOS what characters you want to accept (or
  4533.               exclude) in a particular position in the filename by using
  4534.               square brackets.  Inside the brackets, you can put the
  4535.               individual acceptable characters or ranges of characters.  For
  4536.               example, if you wanted to match LETTER0.DOC through
  4537.               LETTER9.DOC, you could use this command:
  4538.  
  4539.                    c:\> dir letter[0-9].doc
  4540.  
  4541.               You could find all files that have a vowel as the second
  4542.               letter in their name this way.  This example also demonstrates
  4543.               how to mix the wildcard characters:
  4544.  
  4545.  
  4546.           ___________________________________________________________________
  4547.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  72
  4548.  
  4549.                                                        CHAPTER 5 / USING 4DOS
  4550.           ___________________________________________________________________
  4551.  
  4552.  
  4553.                    c:\> dir ?[aeiouy]*.*
  4554.  
  4555.               You can exclude a group of characters or a range of characters
  4556.               by using an exclamation mark [!] as the first character inside
  4557.               the brackets.  This example displays all filenames that are at
  4558.               least 2 characters long except those which have a vowel as the
  4559.               second letter in their names:
  4560.  
  4561.                    c:\> dir ?[!aeiouy]*.*
  4562.  
  4563.               The next example, which selects files such as AIP, BIP, and
  4564.               TIP but not NIP, demonstrates how you can use multiple ranges
  4565.               inside the brackets.  It will accept a file that begins with
  4566.               an A, B, C, D, T, U, or V:
  4567.  
  4568.                    c:\> dir [a-dt-v]ip
  4569.  
  4570.            ## You may use a question mark character inside the brackets, but
  4571.               its meaning is slightly different than a normal (unbracketted)
  4572.               question mark wildcard.  A normal question mark wildcard
  4573.               matches any character or an implied blank at the end of a name
  4574.               or extension.  4DOS will match a question mark inside brackets
  4575.               with any character but not with an implied blank.  For
  4576.               example,
  4577.  
  4578.                    c:\> dir letter[?].doc
  4579.  
  4580.               will display LETTER1.DOC and LETTERA.DOC, but not LETTER.DOC.
  4581.  
  4582.            ## You can repeat any of the wildcard characters in any
  4583.               combination you desire within a single file name.  For
  4584.               example, the following command lists all files which have an
  4585.               A, B, or C as the third character, followed by zero or more
  4586.               additional characters, followed by a D, E, or F, followed
  4587.               optionally by some additional characters, and with an
  4588.               extension beginning with P or Q.  You probably won't need to
  4589.               do anything this complex, but we've included it to show you
  4590.               the flexibility of 4DOS wildcards:
  4591.  
  4592.                    c:\> dir ??[abc]*[def]*.[pq]*
  4593.  
  4594.  
  4595.               Multiple Filenames
  4596.  
  4597.               Most 4DOS file processing commands can work with multiple
  4598.               files at one time.  To use multiple file names, you simply
  4599.               list the files one after another on the command line,
  4600.               separated by spaces.  You can use wildcards in any or all of
  4601.  
  4602.  
  4603.           ___________________________________________________________________
  4604.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  73
  4605.  
  4606.                                                        CHAPTER 5 / USING 4DOS
  4607.           ___________________________________________________________________
  4608.  
  4609.  
  4610.               the filenames.  For example, to copy all .TXT  and .DOC files
  4611.               from the current directory to drive A, you could use this
  4612.               command:
  4613.  
  4614.                    c:\> copy *.txt *.doc a:
  4615.  
  4616.               If the files you want to work with are not in the default
  4617.               directory, you must include the full path with each filename:
  4618.  
  4619.                    c:\> copy a:\details\file1.txt a:\details\file1.doc c:
  4620.  
  4621.             ! Multiple filenames are handy when you want to match a group of
  4622.               files which cannot be defined with a single filename and
  4623.               wildcards.  They let you be very specific about which files
  4624.               you want to work with in a command.  When you use multiple
  4625.               filenames with a command that expects both a source and a
  4626.               destination, like COPY or MOVE, be sure that you always
  4627.               include a specific destination on the command line.  If you
  4628.               don't, the command will assume that the last filename is the
  4629.               destination and may overwrite important files.
  4630.  
  4631.               Like extended wildcards and include lists (see below), the
  4632.               4DOS multiple filename feature will work with internal 4DOS
  4633.               commands but not with external programs unless those programs
  4634.               have been written to handle multiple file names on the command
  4635.               line.
  4636.  
  4637.               If you have a list of files to process that's too long to put
  4638.               on the command line or too time-consuming to type, see the
  4639.               SELECT command on page 286 for another way of passing multiple
  4640.               file names to a command.
  4641.  
  4642.  
  4643.               Include Lists
  4644.  
  4645.               Any 4DOS command that accepts multiple filenames can also
  4646.               accept one or more include lists.  An include list is simply a
  4647.               group of filenames, with or without wildcards, separated by
  4648.               semi-colons [;].  All files in the include list must be in the
  4649.               same directory.  You may not add a space on either side of the
  4650.               semi-colon.
  4651.  
  4652.               If you used an include list instead of multiple file names for
  4653.               the previous examples, they would look like this:
  4654.  
  4655.                    c:\> copy *.txt;*.doc a:
  4656.                    c:\> copy a:\details\*.txt;*.doc c:
  4657.  
  4658.  
  4659.  
  4660.           ___________________________________________________________________
  4661.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  74
  4662.  
  4663.                                                        CHAPTER 5 / USING 4DOS
  4664.           ___________________________________________________________________
  4665.  
  4666.  
  4667.               Include lists are similar to multiple filenames, but have
  4668.               three important differences.  First, you don't have to repeat
  4669.               the path to your files if you use an include list, because all
  4670.               of the included files must be in the same directory.  Second,
  4671.               if you use include lists, you aren't as likely to accidentally
  4672.               overwrite files if you forget a destination path for commands
  4673.               like COPY, because the last name in the list will be part of
  4674.               the include list, and won't be seen as the destination file
  4675.               name.  Include lists can only be used as the source parameter
  4676.               (the location files are coming from) for COPY and other
  4677.               similar commands.  They cannot be used to specify a
  4678.               destination for files.
  4679.  
  4680.               Third, multiple filenames and include lists are processed
  4681.               differently by the 4DOS DIR and SELECT commands.  If you use
  4682.               multiple filenames, all of the files matching the first
  4683.               filename are processed, then all of the files matching the
  4684.               second name, and so on.  When you use an include list, all
  4685.               files that match any entry in the include list are processed
  4686.               together, and will appear together in the directory display or
  4687.               SELECT list.  You can see this difference most clearly if you
  4688.               experiment with both techniques and the DIR command.  For
  4689.               example,
  4690.  
  4691.                    c:\> dir *.txt *.doc
  4692.  
  4693.               will list all the .TXT files with a directory header, the file
  4694.               list, and a summary of the total number of files and bytes
  4695.               used.  Then it will do the same for the .DOC files.  However,
  4696.  
  4697.                    c:\> dir *.txt;*.doc
  4698.  
  4699.               will display all the files in one list.
  4700.  
  4701.               Like extended wildcards and multiple filenames (see above),
  4702.               the 4DOS include list feature will work with internal 4DOS
  4703.               commands but not with external programs unless they have been
  4704.               programmed especially to parallel 4DOS's features.
  4705.  
  4706.  
  4707.               Executable Extensions
  4708.  
  4709.               Normally, when you type a filename (as opposed to an alias or
  4710.               internal command name) as the first word on the command line,
  4711.               4DOS looks for a .COM, .EXE, .BTM, or .BAT file with that name
  4712.               to execute (.COM and .EXE files are executable programs; .BTM
  4713.               and .BAT files are batch files).  You can add to this list of
  4714.               extensions and have 4DOS take the actions you want with files
  4715.  
  4716.  
  4717.           ___________________________________________________________________
  4718.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  75
  4719.  
  4720.                                                        CHAPTER 5 / USING 4DOS
  4721.           ___________________________________________________________________
  4722.  
  4723.  
  4724.               that have other extensions as well.  You could have 4DOS start
  4725.               your text editor whenever you type the name of a .DOC file, or
  4726.               start your database manager whenever you type the name of a
  4727.               .DAT file.
  4728.  
  4729.               4DOS uses environment variables to define what program or
  4730.               batch file to run for each defined file extension.  To create
  4731.               an executable extension, you use the SET command to create a
  4732.               new environment variable.
  4733.  
  4734.               For example, if you want to run a word processor called EDITOR
  4735.               whenever you type the name of a file that has an extension of
  4736.               .EDT, you could use this command:
  4737.  
  4738.                    c:\> set .edt=c:\edit\editor.exe
  4739.  
  4740.               The syntax for creating an executable extension is
  4741.  
  4742.                    set .ext=d:\path\program [options]
  4743.  
  4744.               where .EXT is the executable file extension, D:\PATH\PROGRAM
  4745.               is the full name of the program or batch file to run, and
  4746.               [options] are any command-line startup options you want to
  4747.               specify for the program.  The pathname is optional if the
  4748.               program is in a directory on your PATH.  The program to run
  4749.               must be a .COM, .EXE, .BTM, or .BAT file or an internal
  4750.               command.  It cannot be an alias.
  4751.  
  4752.            ## Extended wildcards (e.g. "DO[CT]" for .DOC and .DOT files) can
  4753.               be used in executable extensions.
  4754.  
  4755.               The following example defines BASICA.COM as the processor for
  4756.               .BAS files:
  4757.  
  4758.                    c:\> set .bas=c:\dos\basica.com
  4759.  
  4760.               With this definition, if you have a file named PUSHCART.BAS in
  4761.               the current directory and enter the command:
  4762.  
  4763.                    c:\> pushcart
  4764.  
  4765.               4DOS will execute the command:
  4766.  
  4767.                    c:\dos\basica.com pushcart
  4768.  
  4769.               The next example defines B.EXE (the Brief text editor) as the
  4770.               processor for .C files:
  4771.  
  4772.  
  4773.  
  4774.           ___________________________________________________________________
  4775.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  76
  4776.  
  4777.                                                        CHAPTER 5 / USING 4DOS
  4778.           ___________________________________________________________________
  4779.  
  4780.  
  4781.                    c:\> set .c=c:\brief\b.exe -Mxyz
  4782.  
  4783.               Now, if you have a file called HELLO.C and enter the command
  4784.  
  4785.                    c:\> hello -i30
  4786.  
  4787.               4DOS will expand the command line and execute this command:
  4788.  
  4789.                    c:\brief\b.exe -Mxyz hello.c -i30
  4790.  
  4791.               Notice that 4DOS inserts the value of the environment variable
  4792.               at the beginning of the line, including any options, then
  4793.               appends the original file name plus its extension, and then
  4794.               the remainder of the original command line.
  4795.  
  4796.               If the program you want to run doesn't accept a file name on
  4797.               its command line as shown in these examples, then executable
  4798.               extensions won't work with that program.
  4799.  
  4800.            ## 4DOS searches for executable commands in the following order:
  4801.               .COM, .EXE, .BTM, .BAT, and executable extensions in the order
  4802.               they appear in the environment.  It first searches the current
  4803.               directory, and then each subdirectory specified by the PATH
  4804.               environment variable (if a "." is used in the PATH the current
  4805.               directory is not searched first; see the PATH command on page
  4806.               267 for details).  4DOS recognizes environment variables as
  4807.               executable extensions if they begin with a period followed by
  4808.               1 to 3 valid filename characters.
  4809.  
  4810.               You may need to take this search order into account when using
  4811.               executable extensions.  Using the .BAS example above, if you
  4812.               had a file FORMAT.BAS in the current directory and entered the
  4813.               command FORMAT A:, 4DOS would run the BASIC interpreter
  4814.               specified by the executable extension, instead of finding the
  4815.               standard DOS FORMAT command as you intended.  You can get
  4816.               around this by remembering that the DOS FORMAT command is in
  4817.               the file FORMAT.COM.  If you entered the command FORMAT.COM A:
  4818.               then 4DOS would not find a match for the executable extension,
  4819.               and would continue the usual search sequence until it found
  4820.               the FORMAT command.
  4821.  
  4822.            ## Executable extensions may include wildcards, so you could, for
  4823.               example, have 4DOS run your text editor for any file with an
  4824.               extension beginning with T by defining an executable extension
  4825.               called .T*.
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.           ___________________________________________________________________
  4832.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  77
  4833.  
  4834.                                                        CHAPTER 5 / USING 4DOS
  4835.           ___________________________________________________________________
  4836.  
  4837.  
  4838.           The Environment
  4839.  
  4840.               The environment is a collection of information about your
  4841.               computer that every program receives.  You can view the
  4842.               environment by typing SET, and modify it with the ESET, SET,
  4843.               and UNSET commands (see pages 219, 291, and 309).
  4844.  
  4845.               Each entry in the environment consists of a variable name
  4846.               (usually in upper case) followed by an equal sign and a string
  4847.               of text.  Some variables are of general use to many programs;
  4848.               some are used only by one program or group of programs.  The
  4849.               content and form of the text string following the equal sign
  4850.               is defined by the program that uses each particular
  4851.               environment variable.  The text strings can be used from the
  4852.               4DOS command line, by application programs, and within aliases
  4853.               and batch files.
  4854.  
  4855.               The text string can include any characters except nulls (ASCII
  4856.               0).  The maximum length for the variable name, equal sign, and
  4857.               text string is 255 characters.
  4858.  
  4859.               4DOS can automatically substitute the text for the variable
  4860.               name in a command.  To create the substitution, include a
  4861.               percent sign [%] and a variable name on the command line or in
  4862.               an alias or batch file.  For example, if you create a variable
  4863.               named BACKUP like this:
  4864.  
  4865.                    c:\> set BACKUP=*.bak;*.bk!;*.bk
  4866.  
  4867.               and then type
  4868.  
  4869.                    c:\> del %BACKUP
  4870.  
  4871.               4DOS will execute the following command:
  4872.  
  4873.                    del *.bak;*.bk!;*.bk
  4874.  
  4875.            ## The variable names you use this way may contain any alphabetic
  4876.               or numeric characters, the underscore character [_], and the
  4877.               dollar sign [$].  You can force 4DOS to accept other
  4878.               characters by including the full variable name in square
  4879.               brackets, like this: %[AB##2].  You can also "nest"
  4880.               environment variables using square brackets.  For example
  4881.               %[%var1] means "the contents of the variable whose name is
  4882.               stored in VAR1".
  4883.  
  4884.            ## If you want to pass a percent sign, or a string beginning with
  4885.               a percent sign, to a command you must use two percent signs in
  4886.  
  4887.  
  4888.           ___________________________________________________________________
  4889.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  78
  4890.  
  4891.                                                        CHAPTER 5 / USING 4DOS
  4892.           ___________________________________________________________________
  4893.  
  4894.  
  4895.               a row.  Otherwise 4DOS will see your single percent sign as
  4896.               the beginning of a variable name, and will not pass it on to
  4897.               the command.  For example, to display the string "We're with
  4898.               you 100%", you would use the command:
  4899.  
  4900.                    echo We're with you 100%%
  4901.  
  4902.            ## Environment variables may be used to contain alias names.
  4903.               Normally 4DOS expands aliases before environment variables.
  4904.               However if you use an environment variable name (with a
  4905.               leading percent sign) as the first word in a command line,
  4906.               4DOS will substitute the variable value for the name, then
  4907.               check for any alias name which may have been included within
  4908.               the variable's value.  For example, the following commands
  4909.               would generate a 2-column directory of the .TXT files:
  4910.  
  4911.                    c:\> alias d2 dir /2
  4912.                    c:\> set cmd=d2
  4913.                    c:\> %cmd *.txt
  4914.  
  4915.            ## The trailing percent sign that was traditionally required for
  4916.               environment variable names is not usually required in 4DOS,
  4917.               which accepts any character that cannot be part of a variable
  4918.               name as the terminator.  However the trailing percent can be
  4919.               used to maintain compatibility.
  4920.  
  4921.               The trailing percent sign is needed if you want to concatenate
  4922.               two variable values.  The following examples show the possible
  4923.               interactions between variables and literal strings.  First,
  4924.               create two environment variables called ONE and TWO this way:
  4925.  
  4926.                    c:\> set ONE=abcd
  4927.                    c:\> set TWO=efgh
  4928.  
  4929.               Now the following combinations produce the output text shown:
  4930.  
  4931.                    %ONE%TWO             abcdTWO   ("%ONE%" + "TWO")
  4932.                    %ONE%TWO%            abcdTWO   ("%ONE%" + "TWO%")
  4933.                    %ONE%%TWO            abcdefgh  ("%ONE%" + "%TWO")
  4934.                    %ONE%%TWO%           abcdefgh  ("%ONE%" + "%TWO%")
  4935.                    %ONE%[TWO]           abcd[TWO] ("%ONE%" + "[TWO]")
  4936.                    %ONE%[TWO]%          abcd[TWO] ("%ONE%" + "[TWO]%")
  4937.                    %[ONE]%TWO           abcdefgh  ("%[ONE]" + "%TWO")
  4938.                    %[ONE]%TWO%          abcdefgh  ("%[ONE]" + "%TWO%")
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.           ___________________________________________________________________
  4946.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  79
  4947.  
  4948.                                                        CHAPTER 5 / USING 4DOS
  4949.           ___________________________________________________________________
  4950.  
  4951.  
  4952.               4DOS Configuration Variables
  4953.  
  4954.               The following environment variables have special meanings in
  4955.               4DOS.  Chapter 6 / Options and Fine Tuning (see page 115)
  4956.               explains the details of how to set and use each of them,
  4957.               except COLORDIR which is explained under the DIR and SELECT
  4958.               commands on pages 204 and 286.  You can see the current value
  4959.               of each variable, if it exists, with the SET command.
  4960.  
  4961.                    CDPATH tells 4DOS where to search for directories
  4962.                    specified by the CD and CDD commands and in automatic
  4963.                    directory changes.  _CDPATH can be used as an alternative
  4964.                    to CDPATH if you are using Microsoft Bookshelf, which
  4965.                    uses a CDPATH variable for its own purposes.
  4966.  
  4967.                    CMDLINE is the fully expanded text (up to 255 characters
  4968.                    long) of the currently executing 4DOS command line.  4DOS
  4969.                    sets CMDLINE just before it invokes any .COM, .EXE, .BTM,
  4970.                    or .BAT file.  If a command line is prefaced with an "@"
  4971.                    to prevent echoing (see page 57), 4DOS also will not
  4972.                    attempt to put it in CMDLINE.  This allows you to squeeze
  4973.                    out the last few bytes of environment space before
  4974.                    loading TSRs by putting a "SET CMDLINE=" before you load
  4975.                    each one, and an "@" prefacing each TSR command.
  4976.  
  4977.                    COLORDIR controls directory display colors used by DIR
  4978.                    and SELECT.
  4979.  
  4980.                    COMSPEC contains the full path and name of 4DOS itself.
  4981.                    COMSPEC is often used by applications which have a "shell
  4982.                    to DOS" feature.
  4983.  
  4984.                    PATH is a list of directories that 4DOS will search for
  4985.                    executable files that aren't in the current directory.
  4986.                    PATH may also be used by some application programs to
  4987.                    find their own files.
  4988.  
  4989.                    PROMPT defines the 4DOS command line prompt.
  4990.  
  4991.                    TEMP specifies the directory where 4DOS should store
  4992.                    temporary pipe files if the TEMP4DOS variable doesn't
  4993.                    exist.  Some other programs also use TEMP to define where
  4994.                    they should place their temporary files.
  4995.  
  4996.                    TEMP4DOS specifies where 4DOS should store temporary pipe
  4997.                    files.
  4998.  
  4999.  
  5000.  
  5001.  
  5002.           ___________________________________________________________________
  5003.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  80
  5004.  
  5005.                                                        CHAPTER 5 / USING 4DOS
  5006.           ___________________________________________________________________
  5007.  
  5008.  
  5009.               ## 4DOS Internal Variables
  5010.  
  5011.               The following variables are not actually stored in the
  5012.               environment, but can be used in commands, aliases, and batch
  5013.               files just like any other environment variable.  The values of
  5014.               these variables are stored internally in 4DOS and cannot be
  5015.               changed with the SET, UNSET, or ESET command.  However, you
  5016.               can override any of these variables by defining a new variable
  5017.               with the same name, which will be stored in the environment.
  5018.  
  5019.               These internal variables are often used in 4DOS batch files
  5020.               and aliases to examine system resources and adjust to the
  5021.               current computer settings.  You can examine the contents of
  5022.               any internal variable from the command line with a command
  5023.               like this:
  5024.  
  5025.                    c:\> echo %variablename
  5026.  
  5027.               In the list below, the possible values for most variables are
  5028.               shown in double quotes for ease of understanding.  The actual
  5029.               values returned by the variables do not include the double
  5030.               quotes.
  5031.  
  5032.               ? contains the exit code of the last external command.  Many
  5033.               programs return a 0 to indicate success and a non-zero value
  5034.               to signal an error.  However, not all programs return an exit
  5035.               code.  If no exit code is returned, the value of %? is
  5036.               undefined.
  5037.  
  5038.               _? contains the exit code of the last internal 4DOS command.
  5039.               It is set to 0 if the command was successful, non-zero if not.
  5040.               You must use or save this value immediately, because it is set
  5041.               by every internal command.
  5042.  
  5043.               _4VER is the current 4DOS version (for example, "4.0").
  5044.  
  5045.               _ALIAS contains the free space in the alias list, in bytes.
  5046.  
  5047.               _ANSI contains "1" if 4DOS's internal flags indicate that
  5048.               ANSI.SYS or a compatible driver is installed; "0" if not.  The
  5049.               internal flags which determine the value of _ANSI depend on
  5050.               the SETDOS /A option (see page 294) and the ANSI directive in
  5051.               4DOS.INI (see page 127), as shown in the table below.  If
  5052.               SETDOS /A is 0 or ANSI  is set to Auto, 4DOS tests for the
  5053.               presence of an ANSI driver.  Because there is no standard and
  5054.               100% reliable way to detect an ANSI driver, you may need to
  5055.               experiment to see if this variable works properly with your
  5056.  
  5057.  
  5058.  
  5059.           ___________________________________________________________________
  5060.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  81
  5061.  
  5062.                                                        CHAPTER 5 / USING 4DOS
  5063.           ___________________________________________________________________
  5064.  
  5065.  
  5066.               particular driver when 4DOS is allowed to test for its
  5067.               presence.
  5068.  
  5069.                                    ANSI
  5070.                    SETDOS /A       Directive      _ANSI Value
  5071.                    ------------    ------------   ------------
  5072.                     0 (default)    Auto (default) Result of test
  5073.                     1              Yes            1
  5074.                     2              No             0
  5075.  
  5076.               _BATCH is the current batch nesting level.  It is "0" if no
  5077.               batch file is currently being processed.
  5078.  
  5079.               _BG is a string containing the first three characters of the
  5080.               screen background color at the current cursor location (for
  5081.               example, "Bla").
  5082.  
  5083.               _BOOT is the boot drive letter, without a colon.
  5084.  
  5085.               _CODEPAGE is the current code page number (see CHCP on page
  5086.               189).
  5087.  
  5088.               _COLUMN is the current cursor column (for example, "0" for the
  5089.               left side of the screen).
  5090.  
  5091.               _COLUMNS is the current number of screen columns (for example,
  5092.               "80").
  5093.  
  5094.               _CPU is the cpu type, returned as a string:
  5095.                    86     8086 and 8088           286   80286
  5096.                    186    80186 and 80188         386   i386
  5097.                    200    NEC V20 and V30         486   i486
  5098.  
  5099.               _CWD is the current directory in the format d:\pathname.
  5100.  
  5101.               _CWDS has the same value as CWD, except it ends the pathname
  5102.               with a backslash [\].
  5103.  
  5104.               _CWP is the current directory in the format \pathname.
  5105.  
  5106.               _CWPS has the same value as CWP, except it ends the pathname
  5107.               with a backslash [\].
  5108.  
  5109.               _DATE contains the current system date, in the format mm-dd-yy
  5110.               (U.S.), dd-mm-yy (Europe), or yy-mm-dd (Japan).
  5111.  
  5112.               _DISK is the current disk drive, without a colon (for example,
  5113.               "C").
  5114.  
  5115.  
  5116.           ___________________________________________________________________
  5117.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  82
  5118.  
  5119.                                                        CHAPTER 5 / USING 4DOS
  5120.           ___________________________________________________________________
  5121.  
  5122.  
  5123.               _DOS is the operating system type ("DOS" or "OS2").  4DOS
  5124.               always returns "DOS", and 4OS2 always returns "OS2".  This is
  5125.               useful if you have batch files running in both modes.
  5126.  
  5127.               _DOSVER is the current DOS version (for example, "5.0").  In
  5128.               the OS/2 DOS compatibility box the version number will be 10.2
  5129.               for OS/2 1.2, 10.3 for OS/2 1.3, 20.0 for OS/2 2.0, and so on.
  5130.  
  5131.               _DOW is the first three characters of the current day of the
  5132.               week ("Mon", "Tue", "Wed", etc.).
  5133.  
  5134.               _DV is "1" if DESQView is loaded or "0" otherwise.
  5135.  
  5136.               _ENV is the free space in the environment, in bytes.
  5137.  
  5138.               _FG is a string containing the first three letters of the
  5139.               screen foreground color at the current cursor position (for
  5140.               example, "Whi").
  5141.  
  5142.               _LASTDISK is the last valid drive letter, without a colon.
  5143.  
  5144.               _MONITOR is the monitor type ("mono" or "color").
  5145.  
  5146.               _MOUSE is 1 if a Microsoft-compatible mouse driver is loaded,
  5147.               and 0 otherwise.
  5148.  
  5149.               _NDP is the coprocessor type, returned as a string:
  5150.  
  5151.                    0      no coprocessor is installed
  5152.                    87     8087
  5153.                    287    80287
  5154.                    387    80387 or 80486DX
  5155.  
  5156.               _ROW is the current cursor row (for example, "0" for the top
  5157.               of the screen).
  5158.  
  5159.               _ROWS is the current number of screen rows (for example,
  5160.               "25").
  5161.  
  5162.               _SHELL is the current shell nesting level.  The primary shell
  5163.               is level "0", and each subsequent secondary shell increments
  5164.               the level by 1.
  5165.  
  5166.               _TIME contains the current system time in the format hh:mm:ss.
  5167.               The separator character may vary depending upon your country
  5168.               information  (see the CHCP command on page 189).
  5169.  
  5170.  
  5171.  
  5172.  
  5173.           ___________________________________________________________________
  5174.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  83
  5175.  
  5176.                                                        CHAPTER 5 / USING 4DOS
  5177.           ___________________________________________________________________
  5178.  
  5179.  
  5180.               _TRANSIENT is 1 if the current shell is transient (started
  5181.               with a /C), or 0 otherwise.
  5182.  
  5183.               _VIDEO is the video card type ("mono", "cga", "ega", or
  5184.               "vga").
  5185.  
  5186.               _WIN is the current Microsoft Windows mode.  This variable
  5187.               will always be zero except when 4DOS is running under
  5188.               Microsoft Windows, or under a DOS session in OS/2 2.0:
  5189.  
  5190.                    0       Windows is not running
  5191.                    1       Windows 2
  5192.                    2       Windows 3 in 386 enhanced mode
  5193.                    3       Windows 3 in real or standard mode
  5194.                    20      OS/2 2.0 DOS machine with Windows support
  5195.  
  5196.               The _CWD, _CWDS, _CWP, _CWPS, and _DISK variables will return
  5197.               their result in upper or lower case depending on the value of
  5198.               the SETDOS /U switch (see page 294) or the UpperCase directive
  5199.               in 4DOS.INI (see page 130).  The _MONITOR and _VIDEO variables
  5200.               always return lower case.  The _BG, _DOW, and _FG variables
  5201.               return the first letter of the result in upper case and the
  5202.               rest in lower case.
  5203.  
  5204.               You can use these variables in a wide variety of ways
  5205.               depending on your needs.  Here are just a few examples.  Some
  5206.               of these examples rely on the IF command (page 238) or the IFF
  5207.               command (page 244) to test the value of a variable and perform
  5208.               different actions based on that value.
  5209.  
  5210.               In a batch file, set the color based on the video card type:
  5211.  
  5212.                    iff "%_video"=="mono" then
  5213.                      color bright white on black
  5214.                    else
  5215.                      color bright white on blue
  5216.                    endiff
  5217.  
  5218.               Call another batch file if 4DOS is running under DESQView:
  5219.  
  5220.                    if "%_dv" == "1" call dvstart
  5221.  
  5222.               Store the current date and time in a file, then save the
  5223.               output of a DIR command in the same file:
  5224.  
  5225.                    echo Directory as of %_date %_time > dirsave
  5226.                    dir >> dirsave
  5227.  
  5228.  
  5229.  
  5230.           ___________________________________________________________________
  5231.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  84
  5232.  
  5233.                                                        CHAPTER 5 / USING 4DOS
  5234.           ___________________________________________________________________
  5235.  
  5236.  
  5237.               Set up a prompt for the primary shell which displays the time
  5238.               and current directory, and a different one for secondary
  5239.               shells which includes the shell level rather than the time.
  5240.               Also set different background colors for the two shells,
  5241.               without changing the foreground color.  You might use a
  5242.               sequence like this in your 4START file, which is executed each
  5243.               time 4DOS starts:
  5244.  
  5245.                    iff %_shell==0 then
  5246.                      prompt $t $p$g
  5247.                      color %_fg on blue
  5248.                    else
  5249.                      prompt [$z] $p$g
  5250.                      color %_fg on cyan
  5251.                    endiff
  5252.  
  5253.  
  5254.               ## 4DOS Variable Functions
  5255.  
  5256.               Variable functions are like internal variables, but they take
  5257.               one or more arguments (which can be environment variables or
  5258.               even other variable functions), and they return a value.  Like
  5259.               all environment variables, these variable functions must be
  5260.               preceded by a percent sign in normal use (%@EVAL, %@LEN,
  5261.               etc.).  All variable functions must have square brackets
  5262.               enclosing their argument(s).
  5263.  
  5264.               The variable functions are useful in aliases and batch files
  5265.               to check on available system resources, manipulate strings and
  5266.               numbers, and work with filenames.  Some of the variable
  5267.               functions, like @DISKFREE, are shown with "b|k|m" as one of
  5268.               their arguments.  Those functions return a number of bytes,
  5269.               kilobytes, or megabytes based upon a "b|k|m" argument:
  5270.  
  5271.                    b     return the number of bytes
  5272.                    K     return the number of kilobytes (bytes / 1,024)
  5273.                    k     return the number of thousands of bytes (bytes /
  5274.                          1,000)
  5275.                    M     return the number of megabytes (bytes / 1,048,576)
  5276.                    m     return the number of millions of bytes (bytes /
  5277.                          1,000,000)
  5278.  
  5279.               @ALIAS[name]:  Returns the contents of the specified alias as
  5280.               a string, or a null string if the alias doesn't exist.
  5281.  
  5282.               @ASCII[c]:  Returns the numeric value of the specified ASCII
  5283.               character as a string.  For example %@ASCII[A] returns 65.
  5284.  
  5285.  
  5286.  
  5287.           ___________________________________________________________________
  5288.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  85
  5289.  
  5290.                                                        CHAPTER 5 / USING 4DOS
  5291.           ___________________________________________________________________
  5292.  
  5293.  
  5294.               @ATTRIB[filename,attrib]:  Returns a "1" if the specified file
  5295.               has the matching attribute(s);  otherwise returns a "0".  The
  5296.               attributes are:
  5297.  
  5298.                    N     Normal (no attribute bits set)
  5299.                    R     Read-only
  5300.                    H     Hidden
  5301.                    S     System
  5302.                    D     Directory
  5303.                    A     Archive
  5304.  
  5305.               The attributes (other than N) can be combined;  ATTRIB will
  5306.               only return a 1 if all the attributes match.
  5307.  
  5308.               @CHAR[n]:  Returns the character corresponding to an ASCII
  5309.               numeric value.  For example %@CHAR[65] returns A.
  5310.  
  5311.               @DATE[mm-dd-yy]:  Returns the number of days since January 1,
  5312.               1980 for the specified date.  DATE uses the date format
  5313.               mandated by your country code (dd-mm-yy in Europe;  yy-mm-dd
  5314.               in Japan).
  5315.  
  5316.               @DESCRIPT[filename]:  Returns the file description for the
  5317.               specified filename (see the DESCRIBE command on page 203).
  5318.  
  5319.               @DEVICE[name]:  Returns 1 if the specified name is a character
  5320.               device (such as a printer or serial port), or 0 if not.
  5321.  
  5322.               @DISKFREE[d:,b|k|m]: Returns the amount of free disk space on
  5323.               the specified drive.
  5324.  
  5325.               @DISKTOTAL[d:,b|k|m]: Returns the total disk space on the
  5326.               specified drive.
  5327.  
  5328.               @DISKUSED[d:,b|k|m]: Returns the amount of disk space in use
  5329.               by files and directories on the specified drive.
  5330.  
  5331.               @DOSMEM[b|k|m]:  Returns the amount of free base memory.
  5332.  
  5333.               @EMS[b|k|m]:  Returns the amount of free EMS memory.
  5334.  
  5335.               @EVAL[expression]:  Evaluates an arithmetic expression.  @EVAL
  5336.               supports addition (+), subtraction (-), multiplication (*),
  5337.               division (/), and modulo (%%).  The expression can contain
  5338.               environment variables and other variable functions.  @EVAL
  5339.               also supports parentheses, commas, and decimal places.
  5340.               Parentheses can be nested.  The maximum number size is 16
  5341.               digits to the left of the decimal point and 8 digits to the
  5342.  
  5343.  
  5344.           ___________________________________________________________________
  5345.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  86
  5346.  
  5347.                                                        CHAPTER 5 / USING 4DOS
  5348.           ___________________________________________________________________
  5349.  
  5350.  
  5351.               right of the decimal point.  @EVAL will strip leading and
  5352.               trailing zeros from the result.  When evaluating expressions,
  5353.               *, /, and %% take precedence over + and -.  For example, 3 + 4
  5354.               * 2 will be interpreted as 3 + 8  = 11, not as (3 + 4) * 2 =
  5355.               14.  To change this order of evaluation, use parentheses to
  5356.               specify the order you want.
  5357.  
  5358.               @EXEC[command]:  Execute the command.  The command can be a
  5359.               4DOS alias, internal command, external command, .BTM file, or
  5360.               .BAT file.  This function is a "back-door" entry into 4DOS
  5361.               command processing and should be used with extreme caution.
  5362.               Incorrect or recursive use of @EXEC may cause stack overflows
  5363.               or hang your system.  @EXEC is primarily intended for running
  5364.               a program from within the PROMPT, where it should also be used
  5365.               with caution.
  5366.  
  5367.               @EXT[filename]:  Returns the extension from a file name,
  5368.               without a leading period.
  5369.  
  5370.               @EXTENDED[b|k|m]:  Returns the amount of extended memory.
  5371.  
  5372.               @FILEDATE[filename]:  Returns the date a file was last
  5373.               modified, in the default country format (mm-dd-yy for the US).
  5374.  
  5375.               @FILESIZE[filename,b|k|m]:  Returns the size of a file.
  5376.  
  5377.               @FILETIME[filename]:  Returns the time a file was last
  5378.               modified, in hh:mm format.  The separator character will vary
  5379.               with the country definition in use on your system.
  5380.  
  5381.               @FULL[filename]:  Returns the fully qualified path name of a
  5382.               file.
  5383.  
  5384.               @INDEX[string1,string2]:  Returns the position of string2
  5385.               within string1, or "-1" if string2 is not found.  The first
  5386.               position in string1 is numbered 0.
  5387.  
  5388.               @INT[n]:  Returns the integer part of the number n.
  5389.  
  5390.               @LABEL[d:]:  Returns the volume label of the specified disk
  5391.               drive.
  5392.  
  5393.               @LEN[string]:  Returns the length of a string.
  5394.  
  5395.               @LINE[filename,n]:  Returns line "n" from the specified file.
  5396.               The first line in the file is numbered 0.  "**EOF**" is
  5397.               returned for all line numbers beyond the end of the file.
  5398.               @LINE will retrieve input from STDIN if you specify "con" as
  5399.  
  5400.  
  5401.           ___________________________________________________________________
  5402.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  87
  5403.  
  5404.                                                        CHAPTER 5 / USING 4DOS
  5405.           ___________________________________________________________________
  5406.  
  5407.  
  5408.               the filename.  If you are redirecting input to @LINE using
  5409.               this feature, you must use command grouping (see page 91)
  5410.               since redirection is normally performed AFTER variable
  5411.               functions are processed.  For example:
  5412.  
  5413.                    (echo %@line[con,0]) < myfile.dat
  5414.  
  5415.               @LINES[filename]:  Returns the line number of the last line in
  5416.               the file, or -1 if the file is empty.  The first line in the
  5417.               file is numbered 0, so (for example) @LINES will return 0 for
  5418.               a file containing one line.
  5419.  
  5420.               @LOWER[string]:  Returns the string converted to lower case.
  5421.  
  5422.               @LPT[n]:  Returns a "1" if the specified printer is ready;
  5423.               otherwise, returns "0".  n=1 checks the printer connected to
  5424.               LPT1, n=2 checks LPT2, and n=3 checks LPT3.
  5425.  
  5426.               @MAKEDATE[n]:  Returns a date (formatted according to the
  5427.               current country settings) from a number of days since 1/1/80.
  5428.               This is the opposite of @DATE.
  5429.  
  5430.               @MAKETIME[n]:  Returns a time (formatted according to the
  5431.               current country settings) from a number of seconds since
  5432.               midnight.  This is the opposite of @TIME.
  5433.  
  5434.               @NAME[filename]:  Returns the base name of a file, without the
  5435.               path or extension.
  5436.  
  5437.               @PATH[filename]:  Returns the path from a file name, including
  5438.               the drive letter and a trailing backslash but not including
  5439.               the base name or extension.
  5440.  
  5441.               @READSCR[row,col,length]:  Returns the text displayed on the
  5442.               screen at the specified location.  The first row and column on
  5443.               the screen are numbered 0.
  5444.  
  5445.               @READY[d:]:  Returns "1" if the specified drive is ready;
  5446.               otherwise returns "0".
  5447.  
  5448.               @REMOTE[d:]:  Returns "1" if the specified drive is a remote
  5449.               (network) drive; otherwise returns "0".
  5450.  
  5451.               @REMOVABLE[d:]:  Returns "1" if the specified drive is
  5452.               removable (i.e., a floppy disk or removable hard disk);
  5453.               otherwise returns "0".
  5454.  
  5455.  
  5456.  
  5457.  
  5458.           ___________________________________________________________________
  5459.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  88
  5460.  
  5461.                                                        CHAPTER 5 / USING 4DOS
  5462.           ___________________________________________________________________
  5463.  
  5464.  
  5465.               @SEARCH[filename]:  Searches for the filename using the PATH
  5466.               environment variable, appending an extension (.COM, .EXE,
  5467.               .BAT, .BTM, or executable extension) if one isn't specified.
  5468.               Returns the fully-expanded name of the file including drive,
  5469.               path, base name, and extension, or an empty string if a
  5470.               matching file is not found.  If wildcards are used in the
  5471.               filename, @SEARCH will search for the first file that matches
  5472.               the wildcard specification, and return the drive and path for
  5473.               that file plus the wildcard filename (e.g., E:\UTIL\*.COM).
  5474.  
  5475.               @SELECT[filename,top,left,bottom,right,title]:  Pops up a
  5476.               selection window with the lines from the specified file.
  5477.               Returns the text of the line the scrollbar is on if you press
  5478.               RETURN, or an empty string if you press ESCAPE.  Can be used
  5479.               to design menus or other selection lists from inside a batch
  5480.               file.
  5481.  
  5482.               @SUBSTR[string,start,length]:  Returns a substring, starting
  5483.               at the position "start" and continuing for "length"
  5484.               characters.  If the length is omitted, it will default to the
  5485.               remainder of the string.  If the length is negative, the start
  5486.               is relative to the right side of the string.  The first
  5487.               character in the string is numbered 0; if the length is
  5488.               negative, the last character is numbered 0.  For example,
  5489.               %@SUBSTR[%_time,0,2] gets the current time and extracts the
  5490.               hour.  If the string includes commas, it must be quoted with
  5491.               double quotes ["] or back-quotes [`].  The quotes do count in
  5492.               calculating the position of the substring to be extracted.
  5493.  
  5494.               @TIME[hh:mm:ss]:  Returns the number of seconds since midnight
  5495.               for the specified time.  The time must be in 24-hour format;
  5496.               "am" and "pm" cannot be used.
  5497.  
  5498.               @TRUENAME[filename]:  Returns the true, fully-expanded name
  5499.               for a file.  TRUENAME will see "through" a JOIN or SUBST, and
  5500.               requires DOS 3.0 or above.  Wildcards may not be used in the
  5501.               filename.
  5502.  
  5503.               @UNIQUE[d:\path]:  Creates a zero-length file with a unique
  5504.               name in the specified directory, and returns the full name and
  5505.               path.  If no path is specified, the file will be created in
  5506.               the current directory.  This function allows you to create a
  5507.               temporary file without overwriting an existing file.  @UNIQUE
  5508.               only works in DOS 3.0 and above.
  5509.  
  5510.               @UPPER[string]:  Returns the string converted to upper case.
  5511.  
  5512.  
  5513.  
  5514.  
  5515.           ___________________________________________________________________
  5516.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  89
  5517.  
  5518.                                                        CHAPTER 5 / USING 4DOS
  5519.           ___________________________________________________________________
  5520.  
  5521.  
  5522.               @WORD[n,string]:  Returns the "nth" word in a string.  The
  5523.               first word is numbered 0.  If "n" is negative, words are
  5524.               returned from the end of the string.  For example:
  5525.  
  5526.                    %@WORD[2,NOW IS THE TIME]      returns "THE"
  5527.                    %@WORD[-0,NOW IS THE TIME]     returns "TIME"
  5528.                    %@WORD[-2,NOW IS THE TIME]     returns "IS"
  5529.  
  5530.               @XMS[b|k|m]:  Returns the amount of free XMS memory.
  5531.  
  5532.               You can use these variable functions in a wide variety of ways
  5533.               depending on your needs.  We've included a few examples below
  5534.               to give you an idea of what's possible.
  5535.  
  5536.               To set the prompt to show the amount of free base memory (see
  5537.               the PROMPT command, page 271,  for details on including
  5538.               variable functions in your prompt):
  5539.  
  5540.                    c:\> prompt (%%@dosmem[K]K) $p$g
  5541.  
  5542.               Set up a simple command line calculator.  The calculator is
  5543.               used with a command like CALC 3 * (4 + 5):
  5544.  
  5545.                    c:\> alias calc `echo The answer is:  %@eval[%&]`
  5546.  
  5547.               The following batch file uses variable functions to implement
  5548.               "once a day" execution of a group of commands.  It works by
  5549.               constructing a 6-digit number "yymmdd" from today's date, and
  5550.               comparing that to a number of the same type stored in the file
  5551.               C:\ONCEADAY.DAT.  If today's date is numerically larger than
  5552.               the saved date, and the time is after 6:00 AM, then the "once
  5553.               a day" commands are run, and today's date is saved in the file
  5554.               as the new date for comparison.  Otherwise, no action is
  5555.               taken.  You can make this file simpler using the %@DATE and
  5556.               %@TIME functions instead of using %@SUBSTR to extract
  5557.               substrings of the %_DATE and %_TIME variables; we used the
  5558.               approach shown to demonstrate the use of %@SUBSTR.
  5559.  
  5560.                   rem  Temporary variables used to shorten example lines:
  5561.                   rem    DD is _date, DY is yymmdd date, TM is _time
  5562.                   set dd=%_date
  5563.                   set dy=%@substr[%dd,6,2]%@substr[%dd,0,2]%@substr[%dd,3,2]
  5564.                   set lastdate=0
  5565.                   iff exist c:\onceaday.dat then
  5566.                     set lastdate=%@line[onceaday.dat,0]
  5567.                   endiff
  5568.                   iff %dy gt %lastdate then
  5569.                     set tm=%_time
  5570.  
  5571.  
  5572.           ___________________________________________________________________
  5573.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  90
  5574.  
  5575.                                                        CHAPTER 5 / USING 4DOS
  5576.           ___________________________________________________________________
  5577.  
  5578.  
  5579.                     iff "%@substr[%tm,0,2]%@substr[%tm,3,2]" gt "0600" then
  5580.                       rem Commands to be executed once a day go here
  5581.                       echo %dy > c:\onceaday.dat
  5582.                     endiff
  5583.                   endiff
  5584.  
  5585.  
  5586.           ## Advanced Features
  5587.  
  5588.               The next four 4DOS features are designed for advanced users of
  5589.               DOS and 4DOS.  If you are a novice user, you might want to
  5590.               skim over this section and return to it as your computing
  5591.               skills and needs progress.
  5592.  
  5593.  
  5594.               Conditional Commands
  5595.  
  5596.               When an internal command or external program finishes, it
  5597.               returns a result called the exit code.  4DOS's conditional
  5598.               commands allow you to perform tasks based upon the previous
  5599.               command's exit code.  Most programs return a 0 if they are
  5600.               successful and a non-zero value if they encounter an error.
  5601.  
  5602.               If you separate two commands by && (AND), the second command
  5603.               will be executed only if the first returns an exit code of 0.
  5604.               For example, the following command will only erase files if
  5605.               the BACKUP operation succeeds:
  5606.  
  5607.                    c:\> backup c:\ a: && del c:\*.bak;*.lst
  5608.  
  5609.               If you separate two commands by || (OR), the second command
  5610.               will be executed only if the first returns a non-zero exit
  5611.               code.  For example, if the following BACKUP operation fails,
  5612.               then ECHO will display a message:
  5613.  
  5614.                    c:\> backup c:\ a: || echo Error in the backup!
  5615.  
  5616.               All 4DOS internal commands return an explicit exit code, but
  5617.               not all application programs do.  Conditional commands will
  5618.               behave unpredictably if you use them with programs which do
  5619.               not return an explicit exit code.
  5620.  
  5621.  
  5622.               Command Grouping
  5623.  
  5624.               Command grouping allows you to logically group a set of
  5625.               commands together by enclosing them in parentheses.  The
  5626.               parentheses are similar in function to the BEGIN and END block
  5627.  
  5628.  
  5629.           ___________________________________________________________________
  5630.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  91
  5631.  
  5632.                                                        CHAPTER 5 / USING 4DOS
  5633.           ___________________________________________________________________
  5634.  
  5635.  
  5636.               statements in some programming languages.  Command grouping is
  5637.               a feature of the OS/2 command processor which 4DOS makes
  5638.               available to you under DOS as well.
  5639.  
  5640.               There are two primary uses for command grouping.  One is to
  5641.               execute multiple commands in a place where normally only a
  5642.               single command is allowed.  For example, suppose you want to
  5643.               copy then rename all the .WKQ files on drives A: and B: using
  5644.               the FOR command.  You could do it like this:
  5645.  
  5646.                    c:\> for %drv in (A B) do copy %drv:*.wkq d:\wksave\
  5647.                    c:\> for %drv in (A B) do ren %drv:*.wkq *.old
  5648.  
  5649.               But with command grouping you can do the same thing in one
  5650.               command (enter this on one line):
  5651.  
  5652.                    c:\> for %drv in (A B) do (copy %drv:*.wkq d:\wksave\ ^
  5653.                         ren %drv:*.wkq *.sav)
  5654.  
  5655.               The COPY and REN commands enclosed in the parentheses appear
  5656.               to FOR as if they were a single command, so both commands are
  5657.               executed for every element of the FOR list.
  5658.  
  5659.               This kind of command grouping is most useful with the EXCEPT,
  5660.               FOR, GLOBAL, and IF commands.  You can not use command
  5661.               grouping to make SELECT execute several commands, because
  5662.               SELECT will assume that the parentheses are marking the list
  5663.               of files from which to select, and will display an error
  5664.               message or give incorrect results if you try to use
  5665.               parentheses for command grouping instead.  (You can use a
  5666.               SELECT command inside the command grouping parentheses, you
  5667.               just can't use command grouping to specify a group of commands
  5668.               for SELECT to execute.)
  5669.  
  5670.               The second common use of command grouping is to redirect input
  5671.               or output for several commands without repeatedly using the
  5672.               redirection symbols.  For example, consider the following
  5673.               batch file fragment which places some header lines (including
  5674.               today's date) and directory displays in an output file using
  5675.               redirection.  The first ECHO command creates the file using >,
  5676.               and the other commands append to the file using >>:
  5677.  
  5678.                    echo Data files %_date > filelist
  5679.                    dir *.dat >> filelist
  5680.                    echo. >> filelist
  5681.                    echo Text files %_date > filelist
  5682.                    dir *.txt >> filelist
  5683.  
  5684.  
  5685.  
  5686.           ___________________________________________________________________
  5687.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  92
  5688.  
  5689.                                                        CHAPTER 5 / USING 4DOS
  5690.           ___________________________________________________________________
  5691.  
  5692.  
  5693.               Using command grouping, these commands can be written much
  5694.               more simply (enter this on one line):
  5695.  
  5696.                    (echo Data files %_date ^ dir *.dat ^ echo. ^ echo Text
  5697.                    files %_date ^ dir *.txt) > filelist
  5698.  
  5699.               The redirection, which appears outside the parentheses,
  5700.               applies to all the commands within the parentheses.  The same
  5701.               approach can be used for input redirection and for piping.
  5702.  
  5703.               You can also use command grouping in a batch file or at the
  5704.               prompt to split commands over several lines.  This last
  5705.               example is like the redirection example above, but is entered
  5706.               at the prompt.  Note that 4DOS displays a "More? prompt after
  5707.               each incomplete line.  None of the commands are executed until
  5708.               the command group is completed with the closing parenthesis.
  5709.               This example does not have to be entered on one line:
  5710.  
  5711.                    c:\> (echo Data files %_date
  5712.                    More? dir *.dat
  5713.                    More? echo.
  5714.                    More? echo Text files %_date
  5715.                    More? dir *.txt) > filelist
  5716.                    c:\>
  5717.  
  5718.               A group of commands in parentheses is like a long command
  5719.               line.  The total length of the group may not exceed 511
  5720.               characters, whether the commands are entered from the prompt,
  5721.               an alias, or a batch file.  The 511-character limit includes
  5722.               the space required to expand aliases and environment variables
  5723.               invoked within the group.
  5724.  
  5725.  
  5726.               Escape Character
  5727.  
  5728.               4DOS recognizes a user-definable escape character.  This
  5729.               character gives the following character a special meaning;  it
  5730.               is not the same as the ASCII ESC that is often used in ANSI
  5731.               sequences.  The default 4DOS escape character is Ctrl-X (ASCII
  5732.               24), which will be displayed on your screen as an up arrow.
  5733.               (The escape character is shown below as "^X", but when
  5734.               entering it you must use the single keystroke Ctrl-X or ASCII
  5735.               24, not "^" followed by "X"!).  You can use the SETDOS /E
  5736.               command or the EscapeChar directive in 4DOS.INI to select a
  5737.               different escape character if you wish.
  5738.  
  5739.               4DOS recognizes six special characters if they are preceded by
  5740.               the escape character.  The combination of the escape character
  5741.  
  5742.  
  5743.           ___________________________________________________________________
  5744.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  93
  5745.  
  5746.                                                        CHAPTER 5 / USING 4DOS
  5747.           ___________________________________________________________________
  5748.  
  5749.  
  5750.               and one of these characters is translated to a single
  5751.               character by 4DOS, as shown below.  These are useful for
  5752.               redirecting codes to the printer; ^Xe is also useful to
  5753.               generate ANSI "escape sequences" in your PROMPT, ECHO, or
  5754.               other output commands; and ^Xr is used in keystroke aliases:
  5755.  
  5756.                    ^Xb   backspace
  5757.                    ^Xe   the ASCII ESC character (ASCII 27)
  5758.                    ^Xf   form feed
  5759.                    ^Xn   line feed
  5760.                    ^Xr   carriage return
  5761.                    ^Xt   tab character
  5762.  
  5763.               If you follow the escape character with any other character,
  5764.               the escape character is removed and the second character is
  5765.               copied directly to the command line.  This allows you to
  5766.               suppress the normal meaning of special characters (such as ? *
  5767.               / \ | " ` > < and &).
  5768.  
  5769.               For example, to send a form feed followed by the sequence ESC
  5770.               Y to the printer, you can use this command:
  5771.  
  5772.                    c:\> echos ^Xf^XeY > prn
  5773.  
  5774.  
  5775.               Argument Quoting
  5776.  
  5777.               When it begins to parse the command line, 4DOS looks for
  5778.               carets [^] to break the line into individual commands, for
  5779.               redirection symbols, and for white space (blanks, tabs, and
  5780.               commas) to separate commands from arguments.  It also looks
  5781.               for percent signs [%] which designate alias or batch file
  5782.               replaceable parameters (%1, %2, etc.), or environment
  5783.               variables, and substitutes the appropriate value for each
  5784.               variable (this process is called variable expansion).
  5785.               Normally, the separation characters and the percent sign
  5786.               cannot be passed to a command as part of an argument.
  5787.               However, you can include any of these special characters in an
  5788.               argument by enclosing the entire argument in back quotes [`]
  5789.               or double quotes ["].  Although both back quotes and double
  5790.               quotes will let you build arguments that include special
  5791.               characters, they do not work the same way.
  5792.  
  5793.               No alias or variable expansion will be performed on an
  5794.               argument enclosed in back quotes.  Redirection symbols inside
  5795.               the back quotes will be ignored.  The back quotes will be
  5796.               removed from the command line before the command is executed.
  5797.  
  5798.  
  5799.  
  5800.           ___________________________________________________________________
  5801.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  94
  5802.  
  5803.                                                        CHAPTER 5 / USING 4DOS
  5804.           ___________________________________________________________________
  5805.  
  5806.  
  5807.               No alias expansion will be performed on expressions enclosed
  5808.               in double quotes.  Redirection symbols inside double quotes
  5809.               will be ignored.  However, variable expansion will be
  5810.               performed on expressions inside double quotes.  The double
  5811.               quotes themselves will be passed through to the command as
  5812.               part of the argument.
  5813.  
  5814.               For example, suppose the batch file QUOTES.BAT contains the
  5815.               following commands:
  5816.  
  5817.                    @echo off
  5818.                    echo Arg1 = %1
  5819.                    echo Arg2 = %2
  5820.                    echo Arg3 = %3
  5821.  
  5822.               and that the environment variable FORVAR has been defined with
  5823.               this command:
  5824.  
  5825.                    c:\> set FORVAR=for
  5826.  
  5827.               Now, if you enter the command
  5828.  
  5829.                    c:\> quotes `Now is the time %forvar` all good
  5830.  
  5831.               the output from QUOTES.BAT will look like this:
  5832.  
  5833.                    Arg1 = Now is the time %forvar
  5834.                    Arg2 = all
  5835.                    Arg3 = good
  5836.  
  5837.               But if you enter the command
  5838.  
  5839.                    c:\> quotes "Now is the time %forvar" all good
  5840.  
  5841.               the output from QUOTES.BAT will look like this:
  5842.                    Arg1 = "Now is the time for"
  5843.                    Arg2 = all
  5844.                    Arg3 = good
  5845.  
  5846.               Notice that in both cases, the quotes keep characters together
  5847.               and reduce the number of arguments in the line.
  5848.  
  5849.               The following example has 7 command line arguments, while the
  5850.               examples above only have 3:
  5851.  
  5852.                    c:\> quotes Now is the time %forvar all good
  5853.  
  5854.  
  5855.  
  5856.  
  5857.           ___________________________________________________________________
  5858.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  95
  5859.  
  5860.                                                        CHAPTER 5 / USING 4DOS
  5861.           ___________________________________________________________________
  5862.  
  5863.  
  5864.               When an alias is defined in a batch file or from the command
  5865.               line, its argument should be enclosed in back quotes to
  5866.               prevent the expansion of replaceable parameters, variables,
  5867.               and multiple commands until the alias is invoked.  Back quotes
  5868.               should not be used when defining aliases to be read in an
  5869.               ALIAS /R file.
  5870.  
  5871.  
  5872.           Aliases
  5873.  
  5874.               Much of the power of 4DOS comes together in aliases, which
  5875.               give you the ability to create your own commands.  An alias is
  5876.               a name that you select for a command or group of commands.
  5877.               Simple aliases substitute a new name for an existing command.
  5878.               More complex aliases can redefine the default settings of 4DOS
  5879.               commands, operate as very fast in-memory batch files, and
  5880.               perform actions based on the results of other actions.
  5881.  
  5882.               This section of the manual will show you some examples of the
  5883.               power of aliases.  You can use these examples as the basis for
  5884.               your own aliases.  See the ALIAS command (page 169) for
  5885.               complete details about writing your own aliases.
  5886.  
  5887.               The simplest type of alias gives a new name to an existing
  5888.               command.  For example, you could create a command called ROOT
  5889.               to switch to the root directory this way:
  5890.  
  5891.                    c:\> alias root = `cd \`
  5892.  
  5893.               After the alias has been defined this way, every time you type
  5894.               the command ROOT, 4DOS will execute the command CD \.
  5895.  
  5896.               Aliases can also create customized versions of 4DOS commands.
  5897.               For example, the 4DOS DIR command can sort a directory in
  5898.               various ways.  You can create an alias called DE that means
  5899.               "sort the directory by filename extension, and pause after
  5900.               each page while displaying it" like this:
  5901.  
  5902.                    c:\> alias de = `dir /oe /p`
  5903.  
  5904.               Aliases can be used to execute sequences of commands as well.
  5905.               The following command creates an alias called W which saves
  5906.               the current drive and directory, changes to the WP directory
  5907.               on drive C, runs the program E:\WP51\WP.EXE, and, when the
  5908.               program terminates, returns to the original drive and
  5909.               directory:
  5910.  
  5911.                    c:\> alias w = `pushd c:\wp ^ e:\wp51\wp.exe ^ popd`
  5912.  
  5913.  
  5914.           ___________________________________________________________________
  5915.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  96
  5916.  
  5917.                                                        CHAPTER 5 / USING 4DOS
  5918.           ___________________________________________________________________
  5919.  
  5920.  
  5921.               Aliases can be nested, that is, one alias can invoke another.
  5922.               For example, the alias above could also be written as:
  5923.  
  5924.                    c:\> alias wp = `e:\wp51\wp.exe`
  5925.                    c:\> alias w = `pushd c:\wp ^ wp ^ popd`
  5926.  
  5927.               If you enter the W command, 4DOS will execute the PUSHD
  5928.               command, detect that the next command (WP) is another alias,
  5929.               execute the program E:\WP51\WP.EXE, and -- when the program
  5930.               exits -- return to the first alias, execute the POPD command,
  5931.               and finally return to the prompt.
  5932.  
  5933.               You can use aliases to change the default options for both
  5934.               internal 4DOS commands and external commands.  Suppose that
  5935.               you always want the DEL command to prompt before it erases a
  5936.               file:
  5937.  
  5938.                    c:\> alias del = `*del /p`
  5939.  
  5940.               You may have a program on your system that has the same name
  5941.               as an internal 4DOS command.  Normally, 4DOS will run the
  5942.               internal command and not let you run the program you desire,
  5943.               unless you explicitly add its full path on the command line
  5944.               (type C:\UTIL\LIST.COM, for example).  Aliases give you two
  5945.               ways to get around this problem.
  5946.  
  5947.               First, you could define an alias that runs the program in
  5948.               question, but with a different name.  For example, if you want
  5949.               to run a program called HELP.EXE when you type HLP, this alias
  5950.               will do the trick:
  5951.  
  5952.                    c:\> alias hlp = `c:\dos\help.exe`
  5953.  
  5954.               Another approach you could take would be to rename the
  5955.               internal 4DOS command and use the original name for the
  5956.               external program.  The following example renames the 4DOS LIST
  5957.               command as DISPLAY and then uses a second alias to run
  5958.               LIST.COM whenever you type LIST:
  5959.  
  5960.                    c:\> alias display = `*list`
  5961.                    c:\> alias list = `c:\util\list.com`
  5962.  
  5963.               You can also assign an alias to a key, so that every time you
  5964.               press the key, the command will be invoked.  After you enter
  5965.               this next example, 4DOS will display a 2-column directory with
  5966.               paging whenever you press Shift plus F5:
  5967.  
  5968.                    c:\> alias @Shift-F5 = `*dir /2/p`
  5969.  
  5970.  
  5971.           ___________________________________________________________________
  5972.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  97
  5973.  
  5974.                                                        CHAPTER 5 / USING 4DOS
  5975.           ___________________________________________________________________
  5976.  
  5977.  
  5978.               That example will put the DIR command on the command line when
  5979.               you press F5 and wait for you to enter file names to display
  5980.               and then press Enter.  This next example clears the screen
  5981.               whenever you press Alt-F1.  The "^X" is the 4DOS escape
  5982.               character (see page 93), which you enter by pressing Ctrl-X
  5983.               (it is entered twice before the r at the end of this alias):
  5984.  
  5985.                    c:\> alias @Alt-F1 = `cls^X^Xr`
  5986.  
  5987.               Aliases have many other capabilities as well.  This example
  5988.               creates a simple command-line calculator.  Once you have
  5989.               entered the example, you can type CALC 4*19, for example, and
  5990.               4DOS will display the answer:
  5991.  
  5992.                    c:\> alias calc = `echo The answer is:  %@eval[%&]`
  5993.  
  5994.               Our last example in this section creates an alias called IN.
  5995.               It will temporarily change directories, run an internal or
  5996.               external command, and then return to the current directory
  5997.               when the command is finished:
  5998.  
  5999.                    c:\> alias in = `pushd %1 ^ %2& ^ popd`
  6000.  
  6001.               Now if you type
  6002.  
  6003.                    c:\> in c:\letters wp letter.txt
  6004.  
  6005.               4DOS will change to the C:\LETTERS subdirectory, execute the
  6006.               command WP LETTER.TXT and then return to the current
  6007.               directory.
  6008.  
  6009.               The distribution diskette includes a sample alias file called
  6010.               ALIASES which contains several useful aliases and demonstrates
  6011.               many alias techniques.  Also, see the ALIAS and UNALIAS
  6012.               commands on pages 169 and 308 for more information and
  6013.               examples.  See page 103 for tips about using aliases inside
  6014.               your batch files.
  6015.  
  6016.  
  6017.           Batch Files
  6018.  
  6019.               A batch file is a file that contains a list of commands for
  6020.               4DOS to execute.  4DOS reads and interprets each line as if it
  6021.               had been typed at the keyboard.  Like aliases, batch files are
  6022.               handy for automating computing tasks.  Unlike aliases, batch
  6023.               files can be as long as you wish.  Batch files take up
  6024.               separate disk space for each file, and can't usually execute
  6025.  
  6026.  
  6027.  
  6028.           ___________________________________________________________________
  6029.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  98
  6030.  
  6031.                                                        CHAPTER 5 / USING 4DOS
  6032.           ___________________________________________________________________
  6033.  
  6034.  
  6035.               quite as quickly as aliases, since they must be read from the
  6036.               disk.
  6037.  
  6038.  
  6039.               .BAT Files and .BTM Files
  6040.  
  6041.               4DOS can execute a batch file in two different modes.  In the
  6042.               first, traditional mode, 4DOS reads and executes the lines of
  6043.               the batch file individually.  In the second mode, 4DOS reads
  6044.               the entire batch file into memory at once.  The second mode
  6045.               can be 5 to 10 times faster, especially if most of the
  6046.               commands in the batch file are internal 4DOS commands.
  6047.               However, only the first mode can be used for self-modifying
  6048.               batch files (which are rare), for batch files which install
  6049.               memory-resident utilities, and for batch files larger than 64K
  6050.               bytes.
  6051.  
  6052.               4DOS decides which batch file mode to use by the file's
  6053.               extension.  It runs files with a .BAT extension in the slower,
  6054.               traditional mode.  Files that have a .BTM extension are run in
  6055.               the faster, more efficient mode.  You can change the execution
  6056.               mode inside of a batch file (of either type) with the LOADBTM
  6057.               command (see page 257).
  6058.  
  6059.  
  6060.               Echoing
  6061.  
  6062.               By default, 4DOS displays or "echoes" every batch file line as
  6063.               it is executed.  You can change this behavior, if you want, in
  6064.               several different ways:
  6065.  
  6066.                    Any batch file line that begins with an [@] symbol will
  6067.                    not be displayed.
  6068.  
  6069.                    The display can be turned off and on within a batch file
  6070.                    with the ECHO OFF and ECHO ON commands.
  6071.  
  6072.                    The default setting can be changed with the SETDOS /V
  6073.                    command (see page 294) or the BatchEcho directive in
  6074.                    4DOS.INI (see page 127).
  6075.  
  6076.               For example, the following line turns off echoing inside a
  6077.               batch file.  The [@] symbol keeps the batch file from
  6078.               displaying the ECHO OFF command:
  6079.  
  6080.                    @echo off
  6081.  
  6082.  
  6083.  
  6084.  
  6085.           ___________________________________________________________________
  6086.           Copyright 1991, JP Software Inc.       4DOS Reference Manual  /  99
  6087.  
  6088.                                                        CHAPTER 5 / USING 4DOS
  6089.           ___________________________________________________________________
  6090.  
  6091.  
  6092.               4DOS also has a command line echo that is unrelated to the
  6093.               batch file echo setting.  See the ECHO command on page 215 for
  6094.               details about both settings.
  6095.  
  6096.  
  6097.               Batch File Variables
  6098.  
  6099.               Like aliases and application programs, batch files can examine
  6100.               the command line that is used to invoke them.  4DOS separates
  6101.               the command tail (everything on the command line after the
  6102.               batch file name) into individual parameters or variables by
  6103.               scanning for the spaces, tabs, and commas that separate the
  6104.               parameters.  A batch file can work with individual parameters
  6105.               or with the command tail as a whole.
  6106.  
  6107.               4DOS numbers these replaceable parameters from %1 to %127.  It
  6108.               is up to the batch file to determine the meaning of each
  6109.               parameter.  Parameters that are referred to in a batch file,
  6110.               but which are missing on the command line, appear as empty
  6111.               strings inside the batch file.
  6112.  
  6113.               A batch file can also work with three special parameters: %0
  6114.               contains the name of the batch file as it was entered on the
  6115.               command line, %# contains the number of command-line
  6116.               arguments, and %n& contains the complete command line tail
  6117.               starting with argument number "n".  The default value of "n"
  6118.               is 1, so %& contains the entire command tail.  The values of
  6119.               these special parameters can change if you use the SHIFT
  6120.               command (see page 299).
  6121.  
  6122.               For example, suppose the batch file interprets the first
  6123.               argument as a subdirectory name.  Then the following line
  6124.               would move to the specified directory:
  6125.  
  6126.                    cd %1
  6127.  
  6128.               A friendlier batch file would check to make sure the directory
  6129.               exists and take some special action if it doesn't:
  6130.  
  6131.                    iff isdir %1 then ^ cd %1
  6132.                    else ^ echo Subdirectory %1 does not exist ^ quit
  6133.                    endiff
  6134.  
  6135.               (see the IF and IFF commands on pages 238 and 244).
  6136.  
  6137.            ## Batch files can also use environment variables, internal
  6138.               variables, and variable functions.  See pages 81 - 91 for a
  6139.               complete list of the internal variables and variable functions
  6140.  
  6141.  
  6142.           ___________________________________________________________________
  6143.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  100
  6144.  
  6145.                                                        CHAPTER 5 / USING 4DOS
  6146.           ___________________________________________________________________
  6147.  
  6148.  
  6149.               available.  You can use these variables and functions to
  6150.               determine system status (e.g., the type of CPU in the system),
  6151.               resource levels (e.g., the amount of free disk space), file
  6152.               information (e.g., the date and time  a file was last
  6153.               modified) and other information (e.g., the current date and
  6154.               time).  You can also perform arithmetic (including date
  6155.               arithmetic), manipulate strings and substrings, extract parts
  6156.               of a filename, and perform simple file access.
  6157.  
  6158.            ## To create temporary variables for use inside a batch file,
  6159.               just use the SET command to store the information you want in
  6160.               an environment variable.  Pick a variable name that isn't
  6161.               likely to be in use by some other program (for example, PATH
  6162.               would be a bad choice), and use the UNSET command (page 309)
  6163.               to remove these variables from the environment at the end of
  6164.               your batch file.  You can also use SETLOCAL and ENDLOCAL
  6165.               (pages 298 and 218) to create a "local" environment so that
  6166.               the original environment will be restored when your batch file
  6167.               is finished.
  6168.  
  6169.            ## Environment variables used in a batch file may contain either
  6170.               numbers or text.  It is up to you to keep track of what's in
  6171.               each variable and use it appropriately; if you don't (for
  6172.               example, if you use %@EVAL to add a number to a text string),
  6173.               you'll get an error message.
  6174.  
  6175.            ## Be careful not to confuse the various kinds of variables that
  6176.               4DOS provides.  Replaceable parameters, environment variables,
  6177.               internal variables, and variable functions look similar and
  6178.               have similar uses but they are not the same.
  6179.  
  6180.  
  6181.               Batch File Commands
  6182.  
  6183.               Several 4DOS commands are particularly suited to batch file
  6184.               processing.  Each command is explained in detail in the
  6185.               Command Reference section of this manual, beginning on page
  6186.               162.  Here is a list of some of the commands you might find
  6187.               most useful:
  6188.  
  6189.                    BEEP produces a sound of any pitch and duration through
  6190.                    the computer's speaker .
  6191.  
  6192.                    CALL executes one batch file from within another.
  6193.  
  6194.                    CANCEL terminates all batch file processing.
  6195.  
  6196.                    CLS and COLOR set the screen display colors.
  6197.  
  6198.  
  6199.           ___________________________________________________________________
  6200.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  101
  6201.  
  6202.                                                        CHAPTER 5 / USING 4DOS
  6203.           ___________________________________________________________________
  6204.  
  6205.  
  6206.                    DRAWBOX draws a box on the screen.
  6207.  
  6208.                    DRAWHLINE and DRAWVLINE draw horizontal and vertical
  6209.                    lines on the screen.
  6210.  
  6211.                    ECHO and ECHOS print text on the screen (the text can be
  6212.                    redirected to a file or device).
  6213.  
  6214.                    GOSUB executes a subroutine inside a batch file.  The
  6215.                    RETURN command terminates the subroutine.
  6216.  
  6217.                    GOTO branches to a different location in the batch file.
  6218.  
  6219.                    FOR executes commands for each file that matches a set of
  6220.                    wildcards, or each entry in a list.
  6221.  
  6222.                    IF and IFF execute commands based on a test of string or
  6223.                    numeric values, program exit codes, or other conditions.
  6224.  
  6225.                    INKEY and INPUT collect keyboard input from the user and
  6226.                    store it in environment variables.
  6227.  
  6228.                    KEYSTACK places keystrokes into the 4DOS Keystack.
  6229.  
  6230.                    LOADBTM changes the batch file operating mode.
  6231.  
  6232.                    PAUSE displays a message and waits for the user to press
  6233.                    a key.
  6234.  
  6235.                    QUIT ends the current batch file and optionally returns
  6236.                    an exit code.
  6237.  
  6238.                    REM places a remark in a batch file.
  6239.  
  6240.                    SCREEN positions the cursor on the screen and optionally
  6241.                    prints a message at the new location.
  6242.  
  6243.                    SCRPUT displays a message in color.
  6244.  
  6245.                    SETLOCAL saves the current disk drive, default directory,
  6246.                    environment, and alias list.  ENDLOCAL restores the
  6247.                    settings that were saved.
  6248.  
  6249.                    SHIFT changes the numbering of the replaceable
  6250.                    parameters.
  6251.  
  6252.                    TEXT displays a block of text.  ENDTEXT ends the block.
  6253.  
  6254.  
  6255.  
  6256.           ___________________________________________________________________
  6257.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  102
  6258.  
  6259.                                                        CHAPTER 5 / USING 4DOS
  6260.           ___________________________________________________________________
  6261.  
  6262.  
  6263.                    TIMER starts or reads a stopwatch.
  6264.  
  6265.                    VSCRPUT displays a vertical message in color.
  6266.  
  6267.               These commands, along with the 4DOS internal variables and
  6268.               variable functions, make the 4DOS batch file language
  6269.               extremely powerful.  The distribution diskette contains a
  6270.               number of sample batch files that demonstrate some of the
  6271.               things you can do with 4DOS batch files.
  6272.  
  6273.  
  6274.               ## Batch File Tips
  6275.  
  6276.               This section gives you some tips on batch file programming,
  6277.               including a few things we've found useful and a few that you
  6278.               should stay from.
  6279.  
  6280.               One way to simplify batch file programming is to use aliases.
  6281.               Not aliases that can be used from the command line, but
  6282.               aliases that hide unnecessary detail inside a batch file.  For
  6283.               example, suppose you want to implement a multiple choice list
  6284.               in a batch file that will let you select among several
  6285.               different applications.  This example shows one way to do so:
  6286.  
  6287.                    alias in `pushd %1 ^ %2& ^ popd`
  6288.                    alias choice `elseiff "%userchoice"=="%1" then`
  6289.                    :dispmenu
  6290.                    screen 8 0
  6291.                    text
  6292.                     Enter your choice:
  6293.                          1. Word Processing
  6294.                          2. Spreadsheet
  6295.                          3. Communications
  6296.                    endtext
  6297.                    inkey %%userchoice
  6298.                    iff "1"=="2" then ^ rem  Always fail and go to next line
  6299.                    choice 1 ^ in d:\letters  c:\wp51\wp.exe
  6300.                    choice 2 ^ in d:\finance  c:\quattro\q.exe
  6301.                    choice 3 ^ in d:\comm  c:\comsw\pcplus.exe
  6302.                    else
  6303.                      scrput 23 0 bri whi on red Invalid choice, try again
  6304.                      goto dispmenu
  6305.                    endiff
  6306.  
  6307.               The first alias, IN, expects 2 or more command-line arguments.
  6308.               It uses the first as a new working directory and changes to
  6309.               that directory with a PUSHD command.  The rest of the command
  6310.               line is interpreted as the name of an application program plus
  6311.  
  6312.  
  6313.           ___________________________________________________________________
  6314.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  103
  6315.  
  6316.                                                        CHAPTER 5 / USING 4DOS
  6317.           ___________________________________________________________________
  6318.  
  6319.  
  6320.               possible command line parameters, which the alias executes.
  6321.               This alias could be used from the command line.
  6322.  
  6323.               The second alias, CHOICE, expects 1 command line argument.  It
  6324.               tests whether an environment variable called userchoice has
  6325.               the same value as the command line argument.  But the test
  6326.               comes between ELSEIFF and THEN statements.  If you try to use
  6327.               CHOICE from the command line, 4DOS will generate an error
  6328.               because it will see ELSEIFF and THEN without the necessary IFF
  6329.               and ENDIFF to define a block.
  6330.  
  6331.               The next 9 lines print a menu on the screen and then get a
  6332.               keystroke from the user and store the keystroke in an
  6333.               environment variable called userchoice.  Then the batch file
  6334.               tests the user's keystroke to decide what action to take.
  6335.  
  6336.               Since the CHOICE alias starts with an ELSEIFF command, there
  6337.               has to be an IFF.  But the first condition must fail in order
  6338.               to get to the CHOICE aliases, so the IFF statement starts with
  6339.               a condition that will always be false.  The three lines after
  6340.               the IFF are easy to follow and much shorter than they would be
  6341.               without the aliases.  If it had to be typed in full, the first
  6342.               choice line would look like this:
  6343.  
  6344.                    elseiff "%userchoice"=="1" then pushd d:\letters ^
  6345.                    c:\wp\wp51.exe ^ popd
  6346.  
  6347.               There's another side to aliases in batch files.  If you're
  6348.               going to distribute your 4DOS batch files to others, you need
  6349.               to remember that they may have aliases defined for the
  6350.               commands you're going to use.  For example if the user has
  6351.               aliased CD to CDD and you aren't expecting this, your file may
  6352.               not work as you intended.  There are two ways to address this
  6353.               problem.  First, you can use SETLOCAL, ENDLOCAL, and UNALIAS
  6354.               to clear out aliases before your batch file starts and restore
  6355.               them at the end.  For example:
  6356.  
  6357.                    setlocal
  6358.                    unalias *
  6359.                    rem Aliases cleared, set up new aliases
  6360.                    alias ...
  6361.                    rem Other batch file commands go here
  6362.                    endlocal
  6363.  
  6364.               Remember that SETLOCAL and ENDLOCAL will save and restore not
  6365.               only the aliases but also the environment and the current
  6366.               drive and directory.
  6367.  
  6368.  
  6369.  
  6370.           ___________________________________________________________________
  6371.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  104
  6372.  
  6373.                                                        CHAPTER 5 / USING 4DOS
  6374.           ___________________________________________________________________
  6375.  
  6376.  
  6377.               If this method isn't appropriate or necessary for the batch
  6378.               file you're working on, you can also use an asterisk [*]
  6379.               before the name of any command.  The asterisk tells 4DOS not
  6380.               to interpret the command that follows it as an alias.  For
  6381.               example the following command redirects a list of file names
  6382.               to the file FILELIST:
  6383.  
  6384.                    dir /b > filelist
  6385.  
  6386.               However if the user has redefined DIR with an alias this
  6387.               command may not do what you want.  To get around this just
  6388.               use:
  6389.  
  6390.                    *dir /b > filelist
  6391.  
  6392.               The same can be done for any command in your batch file.  If
  6393.               you use the asterisk, 4DOS will skip alias processing, discard
  6394.               the asterisk, and process the rest of the command normally as
  6395.               an internal command, external command, or batch file.  Using
  6396.               an asterisk before a command will work whether or not there is
  6397.               actually an alias defined with the same name as the command.
  6398.               If there is no alias with that name, the asterisk will be
  6399.               ignored and the command will be processed as if the asterisk
  6400.               wasn't there.
  6401.  
  6402.               There are several tricks you can use in debugging batch files.
  6403.               Probably the simplest is to turn ECHO on at the beginning of
  6404.               the file while you're testing it, or use SETDOS /V2 to force
  6405.               echo on even if an ECHO OFF command is used in the batch file.
  6406.               This will give you a picture of what 4DOS is doing when it
  6407.               executes the file.  It will make your output look messy of
  6408.               course, so just turn it off once things are working.  You can
  6409.               also turn ECHO on at the beginning of a group of commands you
  6410.               want to "watch", and off at the end, just by adding ECHO
  6411.               commands at the appropriate spots in your file.
  6412.  
  6413.               Another trick is to insert PAUSE commands wherever you need
  6414.               them in order to be able to watch what's happening.  For
  6415.               complex debugging, you can make an alias that uses INKEY for a
  6416.               similar purpose, but helps you out a little more.  For example
  6417.               (enter this on one line):
  6418.  
  6419.                    alias step `set skey=^inkey Step:  %%skey^iff
  6420.                    "%skey"=="S" then ^ set /P ^ elseiff "%skey"=="X" then ^
  6421.                    quit ^ endiff`
  6422.  
  6423.               Now anywhere you insert a STEP command in your file you'll get
  6424.               the Step: prompt during execution.  At that point you can type
  6425.  
  6426.  
  6427.           ___________________________________________________________________
  6428.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  105
  6429.  
  6430.                                                        CHAPTER 5 / USING 4DOS
  6431.           ___________________________________________________________________
  6432.  
  6433.  
  6434.               S to do a SET /P and display the current contents of your
  6435.               environment variables, X to exit the batch file, and any other
  6436.               key to go on.  Of course you'll need to create an alias
  6437.               tailored to your particular needs, but this gives you the
  6438.               basic idea.
  6439.  
  6440.               If you can't figure out how 4DOS is expanding your aliases and
  6441.               variables, try turning LOG on at the start of the batch file.
  6442.               LOG keeps track of all commands after alias and variable
  6443.               expansion  are completed, and gives you a record in a file
  6444.               that you can examine after the batch file is done.
  6445.  
  6446.               You may also want to consider using redirection to capture
  6447.               your batch file output.  Simply type the batch file name
  6448.               followed by the redirection symbols, for example:
  6449.  
  6450.                    c:\> mybatch >& testout
  6451.  
  6452.               This records all batch file output, including error messages,
  6453.               in the file TESTOUT, so you can go back and examine it.  If
  6454.               you have ECHO ON in the batch file you'll get the batch
  6455.               commands intermingled with the output, which can provide a
  6456.               very useful trace of what's happening.  Of course output from
  6457.               full-screen commands and programs that don't write to the
  6458.               standard DOS output devices can't be recorded, but you can
  6459.               still gain a lot of useful information if your batch file does
  6460.               much output.
  6461.  
  6462.               If you're using redirection to see the output, remember that
  6463.               any prompts for input will probably go to the output file and
  6464.               not to the screen, so you need to know in advance the sequence
  6465.               of keystrokes required to get through the entire batch file,
  6466.               and enter them by hand or with KEYSTACK.  (As an example, the
  6467.               raw text for the 4DOS tour in this manual was created by
  6468.               writing a batch file containing the demonstration commands,
  6469.               testing it to get the proper keystroke sequence, and executing
  6470.               a command which used KEYSTACK to send the keystrokes and
  6471.               redirected the batch file's output to a disk file.)
  6472.  
  6473.               Because of the power of the 4DOS batch language, some
  6474.               programmers begin to treat it as a full, general-purpose
  6475.               language.  But the batch language is interpreted one line at a
  6476.               time, which can lead the unwary into some subtle traps.
  6477.  
  6478.               In particular, the IFF and GOTO instructions may not work
  6479.               together as many programmers expect.  4DOS has no way of
  6480.               telling whether a GOTO is branching within the same IFF block,
  6481.               into another IFF block, or out of all IFF blocks, so it has to
  6482.  
  6483.  
  6484.           ___________________________________________________________________
  6485.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  106
  6486.  
  6487.                                                        CHAPTER 5 / USING 4DOS
  6488.           ___________________________________________________________________
  6489.  
  6490.  
  6491.               make an assumption.  It assumes that the branch is leaving the
  6492.               IFF block and it therefore cancels all pending IFF processing.
  6493.               For example, the following commands will NOT work:
  6494.  
  6495.                    iff "%_monitor" == "color" then
  6496.                      iff %@diskfree[c:,K] gt 100 then
  6497.                        set var1=Y
  6498.                        goto point1
  6499.                      else
  6500.                        set var1=N
  6501.                      endiff
  6502.                    else
  6503.                      :point1
  6504.                      rem  do something else here
  6505.                    endiff
  6506.  
  6507.               If the GOTO in the 4th line is executed, the commands after
  6508.               :POINT1 will execute properly.  But 4DOS will generate an
  6509.               error message when it reaches the last ENDIFF, because it
  6510.               assumed that the GOTO branched outside of all IFF blocks.  You
  6511.               can override this restriction with GOTO /I, but do so only if
  6512.               you are absolutely certain that your GOTO command is branching
  6513.               entirely within the current active IFF statement, and not into
  6514.               another IFF statement or a different IFF nesting level.  Using
  6515.               /I under any other conditions will cause an error later in
  6516.               your batch file.
  6517.  
  6518.               Because the IFF state is saved whenever a GOSUB occurs or
  6519.               whenever another batch file is CALLed, GOTO only cancels IFF
  6520.               processing within the current subroutine or batch file.  This
  6521.               allows you to use GOTO inside a subroutine without affecting
  6522.               any IFF blocks that surround the GOSUB statement which called
  6523.               the subroutine.
  6524.  
  6525.               GOSUB and GOTO can also have unexpected consequences when
  6526.               mixed with chains to new batch files.  The GOSUB, and any
  6527.               block that contains it, remains active after the second batch
  6528.               file ends.  Here is another example that will NOT work:
  6529.  
  6530.                    BAT1:
  6531.  
  6532.                    rem  do something here
  6533.                    gosub sub1
  6534.                    quit
  6535.                    :sub1
  6536.                    rem  do something else here
  6537.                    if [some condition] BAT2
  6538.                    return
  6539.  
  6540.  
  6541.           ___________________________________________________________________
  6542.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  107
  6543.  
  6544.                                                        CHAPTER 5 / USING 4DOS
  6545.           ___________________________________________________________________
  6546.  
  6547.  
  6548.  
  6549.  
  6550.                    BAT2:
  6551.  
  6552.                    rem  do some more work
  6553.                    BAT1
  6554.  
  6555.               If the condition near the end of BAT1 is true, then BAT2 is
  6556.               launched.  But BAT2 ends by restarting BAT1.  The original
  6557.               BAT1's subroutine is still pending.  Since 4DOS has no way to
  6558.               detect this infinite loop, it will eventually suffer a stack
  6559.               overflow and hang the system.  If you do want to chain from
  6560.               one batch file to another, set an environment variable inside
  6561.               the GOSUB block and then use that variable outside the block
  6562.               to see whether you should CALL another batch file.
  6563.  
  6564.  
  6565.  
  6566.  
  6567.  
  6568.  
  6569.  
  6570.  
  6571.  
  6572.  
  6573.  
  6574.  
  6575.  
  6576.  
  6577.  
  6578.  
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.  
  6587.  
  6588.  
  6589.  
  6590.  
  6591.  
  6592.  
  6593.  
  6594.  
  6595.  
  6596.  
  6597.  
  6598.           ___________________________________________________________________
  6599.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  108
  6600.  
  6601.                                                CHAPTER 6 / OPTIONS AND TUNING
  6602.           ___________________________________________________________________
  6603.  
  6604.  
  6605.  
  6606.           ## CHAPTER 6 / OPTIONS AND TUNING
  6607.  
  6608.  
  6609.           Normally, the 4DOS install program will properly set up your system
  6610.           to run 4DOS.  It must, however, make certain assumptions about your
  6611.           computer and the way that you will use 4DOS.  This chapter explains
  6612.           how you can tune 4DOS to make it as efficient and as useful as
  6613.           possible in your computing environment.
  6614.  
  6615.           Nearly everything in this chapter is for advanced users and those
  6616.           with unusual needs.  If 4DOS works the way you want it to after the
  6617.           automatic installation, you can skip this chapter.  You may,
  6618.           however, want to skim this material to see what options are
  6619.           available.
  6620.  
  6621.  
  6622.           Configuration Files
  6623.  
  6624.               4DOS uses five configuration files.  Two are for general DOS
  6625.               configuration;  the other three are unique to 4DOS.  The
  6626.               general DOS files are CONFIG.SYS and AUTOEXEC.BAT.  The
  6627.               specialized 4DOS files are called 4START.BTM, 4EXIT.BTM, and
  6628.               4DOS.INI.  These five files are discussed in order in this
  6629.               section.
  6630.  
  6631.             ! Anytime you change a configuration file, a typographical
  6632.               mistake or other error could make your system lock up or run
  6633.               erratically.  Before you make any changes to any of these
  6634.               files, we strongly urge you to take the some precautions.
  6635.  
  6636.               First, create a boot-up floppy diskette (you can use the
  6637.               FORMAT /S command) and make sure that you can use it to boot
  6638.               your computer.  Second, make a backup copy of all five
  6639.               configuration files.  You might want to create copies that
  6640.               have the same base name plus an extension of .BAK.  Copy the
  6641.               .BAK files to your boot-up floppy for safe keeping.  You also
  6642.               might want to make a copy of your computer's SETUP information
  6643.               (on 80286, 386, and 486 computers) and save it on this floppy.
  6644.               If the battery that keeps that data in your computer fails,
  6645.               this file will be invaluable after you install a new battery.
  6646.               A short text file should be sufficient.
  6647.  
  6648.               With these two precautions, if something goes wrong, you will
  6649.               be able to boot with your floppy diskette and copy the files
  6650.               back to their original names.  You'll only have to spend a few
  6651.               minutes recovering your system.  You probably will want to
  6652.               follow the same precautions each time you install a new
  6653.  
  6654.  
  6655.           ___________________________________________________________________
  6656.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  109
  6657.  
  6658.                                                CHAPTER 6 / OPTIONS AND TUNING
  6659.           ___________________________________________________________________
  6660.  
  6661.  
  6662.               application program that changes your DOS or 4DOS
  6663.               configuration files.
  6664.  
  6665.  
  6666.           Setting up CONFIG.SYS
  6667.  
  6668.               The CONFIG.SYS file contains instructions for DOS to execute
  6669.               before it loads a command processor.  Only one line in the
  6670.               CONFIG.SYS file affects 4DOS.  It tells DOS to use 4DOS as the
  6671.               command processor instead of COMMAND.COM.  The format of this
  6672.               line is:
  6673.  
  6674.                    SHELL=d:\path\4DOS.COM [d:\path] [@d:\path\inifile]
  6675.                     [/E:nnnn] [/F] [/P] [//iniline]...  [command]
  6676.  
  6677.               "SHELL=" identifies this line as defining the command
  6678.               processor that DOS will load after it finishes executing the
  6679.               commands in CONFIG.SYS.  It is required.
  6680.  
  6681.               If 4DOS is not in the root directory of the boot drive,
  6682.               replace the first "d:\path\" (immediately after "SHELL=") with
  6683.               the 4DOS drive and directory (if you are using DOS 2.x, 4DOS
  6684.               must be in the root directory of the boot drive).  The drive
  6685.               and path must be correct or your system won't boot (and you'll
  6686.               be very happy that you made the boot-up floppy we suggested).
  6687.               The remainder of the items on this line are optional.  If they
  6688.               are used, you should not include the square brackets.  In the
  6689.               descriptions below, "d:" means a drive letter and "\path"
  6690.               means a subdirectory name.
  6691.  
  6692.               d:\path      This is the "d:\path" option shown in square
  6693.                            brackets above (not the "d:\path" immediately
  6694.                            after "SHELL=").  It sets the drive and directory
  6695.                            where 4DOS is stored.  4DOS uses this path to set
  6696.                            the COMSPEC environment variable.  When running
  6697.                            under MS-DOS or PC-DOS 3.0 or above, 4DOS will
  6698.                            normally find itself automatically and this
  6699.                            option will not be needed.  When running under
  6700.                            DR-DOS this option is required unless 4DOS.COM is
  6701.                            in the root directory of the boot drive.  When
  6702.                            4DOS is running as the primary command processor,
  6703.                            you can tell if COMSPEC has been set correctly by
  6704.                            typing the following line at the 4DOS prompt:
  6705.  
  6706.                                    echo %comspec
  6707.  
  6708.                            If 4DOS has properly located itself, the location
  6709.                            of 4DOS.COM will be correctly displayed.  If the
  6710.  
  6711.  
  6712.           ___________________________________________________________________
  6713.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  110
  6714.  
  6715.                                                CHAPTER 6 / OPTIONS AND TUNING
  6716.           ___________________________________________________________________
  6717.  
  6718.  
  6719.                            COMSPEC is incorrect, you can set it yourself in
  6720.                            AUTOEXEC.BAT, or add this "d:\path" option on the
  6721.                            SHELL= line.
  6722.  
  6723.               @d:\path\inifile
  6724.                            This option sets the path and name of the
  6725.                            4DOS.INI file, which is discussed below.  If the
  6726.                            INI file is in the same directory as 4DOS.COM, or
  6727.                            is in the root directory of the boot drive, and
  6728.                            is named 4DOS.INI, or if you aren't using an INI
  6729.                            file at all, then this option is not needed.
  6730.                            Otherwise, it must be included.
  6731.  
  6732.               /E:nnnn      This option sets the size of the environment, in
  6733.                            bytes.  If you don't use this option, 4DOS will
  6734.                            allocate 512 bytes for the environment.  You can
  6735.                            use any value from 256 to 32000 as the
  6736.                            environment size.  For example, to set an
  6737.                            environment of 1,000 bytes, you would enter the
  6738.                            option this way:
  6739.  
  6740.                                    /E:1000
  6741.  
  6742.                            You can also set the environment size with the
  6743.                            Environment directive in the 4DOS.INI file (see
  6744.                            below).
  6745.  
  6746.               /F           This option tells 4DOS to automatically provide a
  6747.                            Fail response to all critical errors, without
  6748.                            prompting or waiting for a user response.  It is
  6749.                            rarely used except on systems that must run
  6750.                            unattended, like bulletin boards.  We do not
  6751.                            recommend use of this option on a normal system,
  6752.                            because you will not have a chance to react to a
  6753.                            critical error and correct the problem that
  6754.                            caused it.  For more information on critical
  6755.                            errors see page 147.  /F only affects critical
  6756.                            errors detected by 4DOS, and will not affect
  6757.                            critical error handling for many application
  6758.                            programs which perform this function themselves.
  6759.  
  6760.               /P           This option tells 4DOS to load permanently and to
  6761.                            run AUTOEXEC.BAT.  When 4DOS is loaded from the
  6762.                            SHELL= command in CONFIG.SYS, it will detect that
  6763.                            it is the primary shell and set the /P option
  6764.                            automatically.  Under very rare circumstances you
  6765.                            may want to load 4DOS permanently and have it run
  6766.                            AUTOEXEC even though you are not loading it from
  6767.  
  6768.  
  6769.           ___________________________________________________________________
  6770.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  111
  6771.  
  6772.                                                CHAPTER 6 / OPTIONS AND TUNING
  6773.           ___________________________________________________________________
  6774.  
  6775.  
  6776.                            CONFIG.SYS; in such cases you must set /P
  6777.                            yourself.  4DOS will not run AUTOEXEC.BAT without
  6778.                            a /P.  Do not use this option in secondary
  6779.                            shells, or you will be unable to return to the
  6780.                            primary shell.
  6781.  
  6782.               //iniline    This option tells 4DOS to treat the text
  6783.                            appearing between the // and the next space or
  6784.                            tab as a 4DOS.INI directive (see page 118 for
  6785.                            information on 4DOS.INI directives).  The
  6786.                            directive should be in the same format as a line
  6787.                            in 4DOS.INI, but may not contain spaces, tabs, or
  6788.                            comments.  Directives on the SHELL= line override
  6789.                            any corresponding directive in 4DOS.INI.  This is
  6790.                            a convenient way to place one or two simple
  6791.                            directives on the SHELL= line without having to
  6792.                            modify or create a 4DOS.INI file, but is
  6793.                            primarily intended for use in secondary shells
  6794.                            (see below).
  6795.  
  6796.               command      This option tells 4DOS to run the command
  6797.                            included on the SHELL= line.  The command will be
  6798.                            run after 4START and AUTOEXEC.BAT but before
  6799.                            displaying the prompt.  It can be any valid
  6800.                            alias, internal or external command, or batch
  6801.                            file, and can include multiple commands (but see
  6802.                            the Caution below).  All other startup options
  6803.                            (such as /F and /P) must be placed before the
  6804.                            command, because 4DOS will treat characters after
  6805.                            the command as part of the command and not as
  6806.                            additional startup options.  Use this option if
  6807.                            you want 4DOS to run a file other than
  6808.                            AUTOEXEC.BAT when your system boots:  simply
  6809.                            rename AUTOEXEC.BAT and place the new name,
  6810.                            including its full path, at the end of the SHELL=
  6811.                            line.
  6812.  
  6813.  
  6814.               Caution
  6815.  
  6816.             ! There is a bug in all versions of MS-DOS and PC-DOS from 2.0
  6817.               through 4.01.  In all these versions, the SHELL= line in the
  6818.               CONFIG.SYS file may not contain more than 31 characters
  6819.               following the name of the shell program (i.e., beginning with
  6820.               the space after the "M" in "4DOS.COM").  If the line is too
  6821.               long, the options will not be passed properly to 4DOS and a
  6822.               variety of errors can occur.  You can set all necessary 4DOS
  6823.               options without exceeding this limit, especially if you put
  6824.  
  6825.  
  6826.           ___________________________________________________________________
  6827.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  112
  6828.  
  6829.                                                CHAPTER 6 / OPTIONS AND TUNING
  6830.           ___________________________________________________________________
  6831.  
  6832.  
  6833.               4DOS.COM and 4DOS.INI in the root directory of your boot
  6834.               drive.  This limit is not present in MS-DOS 5.0 and above or
  6835.               in DR-DOS.
  6836.  
  6837.  
  6838.               4DOS and DOS 2
  6839.  
  6840.               We recommend using DOS 3.1 or above, but 4DOS can be used with
  6841.               DOS 2.  The only special consideration is that 4DOS must be
  6842.               loaded differently under DOS 2.x, because certain DOS 2
  6843.               functions require that COMMAND.COM be loaded as the primary
  6844.               command processor.  Therefore, you must load COMMAND.COM first
  6845.               and then 4DOS.  Assuming that all files are in the root
  6846.               directory of your boot drive, the SHELL= line in DOS 2.x
  6847.               should look like this:
  6848.  
  6849.                    shell=command.com /c 4DOS [options]
  6850.  
  6851.               Note that due to the "/c 4DOS" on the SHELL line, fewer
  6852.               options can be used before running into the 31-character
  6853.               limit.  You must, however, use the /P option, or AUTOEXEC.BAT
  6854.               will not run.  4DOS will not automatically detect that it is
  6855.               the primary shell and set /P for you when run under DOS 2.
  6856.  
  6857.  
  6858.               Startup Options for Secondary Shells
  6859.  
  6860.               In most cases, secondary shells do not use or require any of
  6861.               the startup options defined for the primary shell in
  6862.               CONFIG.SYS.  Usually, you can only set explicit options for a
  6863.               4DOS secondary shell when you define a 4DOS window in a
  6864.               multitasking system such as Back & Forth, DESQView, Windows,
  6865.               or the MS-DOS shell (DOSSHELL); or in rare cases when you run
  6866.               a secondary copy of 4DOS directly from the command line.  If
  6867.               you do need to set options for secondary shells, you can use
  6868.               any of the following:
  6869.  
  6870.               @d:\path\inifile
  6871.                            Set INI file name, as in CONFIG.SYS (see above).
  6872.                            This option is not necessary if you want 4DOS to
  6873.                            use the same INI file that you used for the
  6874.                            primary shell, as values from that file --
  6875.                            including those in its [Secondary] section --
  6876.                            will be passed automatically to secondary shells.
  6877.  
  6878.               /C command   This option forces 4DOS to execute a command and
  6879.                            then return to the parent program.  It is used by
  6880.                            some applications to start the command processor,
  6881.  
  6882.  
  6883.           ___________________________________________________________________
  6884.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  113
  6885.  
  6886.                                                CHAPTER 6 / OPTIONS AND TUNING
  6887.           ___________________________________________________________________
  6888.  
  6889.  
  6890.                            run one command, and the return to the
  6891.                            application.  This option can be used when 4DOS
  6892.                            is run as a secondary shell, but never in the
  6893.                            SHELL statement in the CONFIG.SYS file.  All
  6894.                            other startup options must be placed before the
  6895.                            command, because 4DOS will treat characters after
  6896.                            the command as part of the command and not as
  6897.                            additional startup options.  This option cannot
  6898.                            be used with the command option (below).
  6899.  
  6900.               /E:nnnn      Set the environment size, as in CONFIG.SYS (see
  6901.                            above).
  6902.  
  6903.               /F           Force an automatic "Fail" on critical error, as
  6904.                            in CONFIG.SYS (see above).
  6905.  
  6906.               //iniline    This option tells 4DOS to treat the text
  6907.                            appearing between the // and the next space or
  6908.                            tab as a 4DOS.INI directive (see page 118 for
  6909.                            more information on 4DOS.INI directives).  The
  6910.                            directive should be in the same format as a line
  6911.                            in 4DOS.INI, but may not contain spaces, tabs, or
  6912.                            comments.  Directives on the SHELL= line override
  6913.                            any corresponding directive in 4DOS.INI.  This
  6914.                            allows you to use 4DOS.INI directives directly on
  6915.                            the command line when starting 4DOS in a window
  6916.                            of a multitasking system, rather than having to
  6917.                            create separate copies of 4DOS.INI to accommodate
  6918.                            small configuration changes in different windows.
  6919.  
  6920.               command      This option tells 4DOS to run the command
  6921.                            included on the line, with the same restrictions
  6922.                            and considerations as the command option in
  6923.                            CONFIG.SYS (see above).  The command will be run
  6924.                            after 4START but before displaying the prompt.
  6925.                            Use this option if you want 4DOS to run a batch
  6926.                            file or execute a command when it starts, for
  6927.                            example to run a specific batch file when 4DOS is
  6928.                            started in a window of a multitasking system.
  6929.                            This option cannot be used with the /C command
  6930.                            option (above).
  6931.  
  6932.  
  6933.           Using AUTOEXEC.BAT
  6934.  
  6935.               If 4DOS is the primary command processor, it is up and running
  6936.               before AUTOEXEC.BAT is executed.  You generally won't need to
  6937.               make any changes to AUTOEXEC.BAT to make it run properly under
  6938.  
  6939.  
  6940.           ___________________________________________________________________
  6941.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  114
  6942.  
  6943.                                                CHAPTER 6 / OPTIONS AND TUNING
  6944.           ___________________________________________________________________
  6945.  
  6946.  
  6947.               4DOS, although once you get used to some of 4DOS's batch file
  6948.               enhancements, you may want to use them to streamline AUTOEXEC.
  6949.  
  6950.               If you want to use the 4DOS KEYSTACK command, you will
  6951.               normally load the program KSTACK.COM from your AUTOEXEC.BAT
  6952.               file.  To do so, include the following line in your file.  Its
  6953.               location in the file is unimportant as long as you place it
  6954.               before any KEYSTACK commands:
  6955.  
  6956.                    d:\path\kstack.com
  6957.  
  6958.               Replace the "d:\path" with the path to the KSTACK.COM program,
  6959.               which will normally be stored in your 4DOS directory.
  6960.  
  6961.               You may want to use AUTOEXEC.BAT to configure 4DOS the way you
  6962.               want it by setting some of the environment variables that 4DOS
  6963.               uses.  You may also want to include a SETDOS command (see page
  6964.               294) to set configuration variables (most of these variables
  6965.               can also be set in the 4DOS.INI file discussed below).  All of
  6966.               these settings are optional.
  6967.  
  6968.               4DOS uses seven environment variables.  Five of the seven (all
  6969.               except PATH and PROMPT) are created with the SET command (see
  6970.               page 291) using this format:
  6971.  
  6972.                    set name=value
  6973.  
  6974.               The seven variables and their uses are explained below:
  6975.  
  6976.                    COMSPEC:  The COMSPEC variable is the path and filename
  6977.                    that programs use to launch a secondary shell.  Normally,
  6978.                    this will be set automatically by 4DOS as it installs
  6979.                    itself.  However, in rare circumstances you may wish to
  6980.                    load 4DOS.COM for secondary shells from a directory other
  6981.                    than the one it's in when you boot (for example, from a
  6982.                    RAM disk).  In these cases, you will need to reset the
  6983.                    COMSPEC variable.  For example, if you want to load
  6984.                    secondary copies of 4DOS.COM from the root directory of
  6985.                    drive D, you would use this command:
  6986.  
  6987.                         set comspec=D:\4DOS.COM
  6988.  
  6989.                    PATH:  The PATH variable lists the directories that 4DOS
  6990.                    should search for executable files that aren't in the
  6991.                    current directory (executable files include .COM, .EXE,
  6992.                    .BTM, and .BAT files and files with executable
  6993.                    extensions).  The PATH variable is normally set with the
  6994.                    PATH command.  See PATH on page 267 for more details.
  6995.  
  6996.  
  6997.           ___________________________________________________________________
  6998.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  115
  6999.  
  7000.                                                CHAPTER 6 / OPTIONS AND TUNING
  7001.           ___________________________________________________________________
  7002.  
  7003.  
  7004.                    PROMPT:  The prompt variable defines the 4DOS command
  7005.                    prompt.  It is normally set with the PROMPT command.  See
  7006.                    PROMPT on page 271 for details about the options
  7007.                    available.
  7008.  
  7009.                    TEMP4DOS:  This variable contains the drive and directory
  7010.                    that 4DOS will use to store temporary pipe files (see
  7011.                    page 65).  If you have a RAM disk, piping will be faster
  7012.                    if you direct 4DOS to use it for the pipe files.  This
  7013.                    variable should hold a single path.  The path can be
  7014.                    terminated with a backslash [\] if you choose, but this
  7015.                    is not required.  For example, to direct pipe temporary
  7016.                    files to the TEMP directory on drive D:
  7017.  
  7018.                         set temp4dos=d:\temp
  7019.  
  7020.                    TEMP:  If TEMP4DOS does not exist, 4DOS looks for this
  7021.                    variable to find the path for temporary pipe files (if
  7022.                    neither exists, 4DOS uses the root directory of the drive
  7023.                    from which it was started).  TEMP is also used by some
  7024.                    other programs to set a path for their temporary files.
  7025.                    The format of TEMP is the same as TEMP4DOS.
  7026.  
  7027.                    COLORDIR:  This variable sets the colors that 4DOS will
  7028.                    use for directories displayed by the DIR and SELECT
  7029.                    commands.  See those commands (page 204 and 286) for
  7030.                    details about COLORDIR.
  7031.  
  7032.                    CDPATH:  This variable defines default directories to be
  7033.                    used by the CD and CDD commands, and by automatic
  7034.                    directory changes.  If CD, CDD, or an automatic directory
  7035.                    entry cannot find the path you specify on the command
  7036.                    line, 4DOS will try appending the command line path to
  7037.                    each path in this variable.  For example, you may have a
  7038.                    C:\LETTERS directory that has subdirectories named JAN,
  7039.                    FEB, MARCH, etc.  You can put C:\LETTERS into CDPATH and
  7040.                    get to the FEB directory from anywhere on your system by
  7041.                    typing CDD FEB or FEB\.
  7042.  
  7043.                    The format of the CDPATH variable is the same as the PATH
  7044.                    variable:  a list of directories separated by semicolons.
  7045.                    For example:
  7046.  
  7047.                         set cdpath=c:\letters;c:\data;c:\memos
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.           ___________________________________________________________________
  7055.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  116
  7056.  
  7057.                                                CHAPTER 6 / OPTIONS AND TUNING
  7058.           ___________________________________________________________________
  7059.  
  7060.  
  7061.           Using 4START and 4EXIT
  7062.  
  7063.               4DOS runs two special batch files automatically, 4START.BTM
  7064.               and 4EXIT.BTM (you can make them .BAT files, if you prefer).
  7065.               4START is executed whenever 4DOS is started as a primary or
  7066.               secondary shell.  In the primary shell, it is executed before
  7067.               AUTOEXEC.BAT.  If 4DOS is started as a secondary shell with
  7068.               the /C command option, 4START is executed before the command.
  7069.  
  7070.               A 4START file is normally very short.  You should NOT load any
  7071.               memory-resident programs (TSRs) from 4START because they will
  7072.               be reloaded every time a secondary shell is started.
  7073.               Normally, 4START is used to vary the PROMPT setting or screen
  7074.               colors from shell to shell.  The LOG command is sometimes used
  7075.               in 4START to record that a new shell has begun.  A PAUSE
  7076.               command inserted temporarily in 4START will let you see if a
  7077.               particular program is running a secondary shell with the /C
  7078.               command option to accomplish some of its own work.  Do not
  7079.               load aliases from 4START -- 4DOS passes them along to a
  7080.               secondary shell automatically, so you only need to load them
  7081.               once, in AUTOEXEC.
  7082.  
  7083.               The 4EXIT batch file is executed every time a secondary 4DOS
  7084.               command processor ends.  A secondary shell can end because of
  7085.               an EXIT command or after completing the command specified with
  7086.               a /C command startup option.  Normally, 4EXIT is used to LOG a
  7087.               record that the shell has ended.  You might also use 4EXIT to
  7088.               view the results of the command that an application has given
  7089.               to 4DOS, or to save the history accumulated during that shell
  7090.               with the HISTORY command with output redirected to a file.
  7091.  
  7092.               4DOS looks for the 4START and 4EXIT batch files in three
  7093.               places:
  7094.  
  7095.                    *  If the 4DOS.INI file has a 4StartPath entry, 4DOS will
  7096.                       use it, and will not look elsewhere.
  7097.  
  7098.                    *  If 4StartPath is not set, 4DOS will look in the
  7099.                       directory where 4DOS.COM is stored.  For the primary
  7100.                       shell, 4DOS determines this directory automatically, or
  7101.                       you can set it yourself by placing a COMSPEC directory
  7102.                       name on the SHELL= line in CONFIG.SYS (see page 110).
  7103.                       For secondary shells, the directory is determined from
  7104.                       the COMSPEC environment variable (see page 115).
  7105.  
  7106.                    *  If the COMSPEC directory search fails, 4DOS will look
  7107.                       in the root directory of the boot drive.
  7108.  
  7109.  
  7110.  
  7111.           ___________________________________________________________________
  7112.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  117
  7113.  
  7114.                                                CHAPTER 6 / OPTIONS AND TUNING
  7115.           ___________________________________________________________________
  7116.  
  7117.  
  7118.               The easiest way to make sure that 4DOS finds the 4START and
  7119.               4EXIT batch files is to specify their location with the
  7120.               4StartPath directive in the 4DOS.INI file (see below).  If you
  7121.               don't, put 4START and 4EXIT in the root directory of the boot
  7122.               drive.  If the COMSPEC drive is not the same as the boot
  7123.               drive, then you should also put a copy of 4START and 4EXIT in
  7124.               the root directory of the COMSPEC drive.
  7125.  
  7126.  
  7127.           Using the 4DOS.INI File
  7128.  
  7129.               4DOS uses a file of initialization information called the
  7130.               4DOS.INI file.  You can create, add to, and edit this file
  7131.               with any ASCII text editor to set 4DOS options and alter the
  7132.               way that 4DOS works.  The 4DOS installation program will
  7133.               create a 4DOS.INI file for you if one does not already exist
  7134.               on your system.  Most of this section explains the options
  7135.               available through 4DOS.INI.  You only need to include entries
  7136.               in 4DOS.INI for any settings that you want to change from
  7137.               their default values.  If you are happy with all of 4DOS's
  7138.               default values, you don't need a 4DOS.INI file at all.
  7139.  
  7140.               Some settings in 4DOS.INI are initialized when you install
  7141.               4DOS, so you may have a 4DOS.INI file even if you didn't
  7142.               create one yourself.  You should not delete this file unless
  7143.               you've checked carefully to be sure that you don't need any of
  7144.               the settings the initialization program put there.
  7145.  
  7146.               When 4DOS is loaded as the primary shell, it searches for the
  7147.               4DOS.INI file in three places:
  7148.  
  7149.                    *  If there is an "@d:\path\inifile" option on the SHELL=
  7150.                       line in CONFIG.SYS (see page 111), 4DOS will use the
  7151.                       path and file name specified there, and will not look
  7152.                       elsewhere.
  7153.  
  7154.                    *  If there is no INI file path or name on the SHELL=
  7155.                       line, 4DOS will look in the same directory where
  7156.                       4DOS.COM is stored (this is how 4DOS.INI is found on
  7157.                       most systems).  4DOS determines this directory
  7158.                       automatically, or you can set it yourself by placing a
  7159.                       COMSPEC directory name on the SHELL= line in CONFIG.SYS
  7160.                       (see page 110).
  7161.  
  7162.                    *  If the COMSPEC directory search fails, 4DOS will look
  7163.                       in the root directory of the boot drive.
  7164.  
  7165.  
  7166.  
  7167.  
  7168.           ___________________________________________________________________
  7169.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  118
  7170.  
  7171.                                                CHAPTER 6 / OPTIONS AND TUNING
  7172.           ___________________________________________________________________
  7173.  
  7174.  
  7175.               When 4DOS is loaded as a secondary shell, it does not search
  7176.               for the 4DOS.INI file.  Instead, it reprocesses the file used
  7177.               for the primary shell (if necessary), then processes any
  7178.               "@d:\path\inifile" option on the secondary shell command line
  7179.               (see page 113).
  7180.  
  7181.               Most lines in the 4DOS.INI file consist of a one-word
  7182.               directive, an equal sign [=], and a value.  For example, in
  7183.               the following line, the word "Environment" is the directive
  7184.               and "2048" is the value:
  7185.  
  7186.                    Environment = 2048
  7187.  
  7188.               Any spaces before or after the equal sign are ignored.  The
  7189.               directive name may be abbreviated to the minimum length needed
  7190.               to make it unique; 4DOS will display an error if the name you
  7191.               use is unknown or ambiguous.  We recommend that you use full-
  7192.               length directive names, since future versions of 4DOS may add
  7193.               directives that would make your abbreviations ambiguous and
  7194.               cause an error.
  7195.  
  7196.               The format of the value part of a directive line depends on
  7197.               the individual directive.  It may be a numeric value, a single
  7198.               character, a choice (like "Yes" or "No"), a color setting, a
  7199.               key name, a path, a filename, or a text string.  The value
  7200.               begins with the first non-blank character after the equal sign
  7201.               and ends at the end of the line or the beginning of a comment.
  7202.  
  7203.               Blank lines are ignored in the 4DOS.INI file and can be used
  7204.               to separate groups of directives.  You can place comments in
  7205.               the file by beginning a line with a semicolon [;].  You can
  7206.               also place comments at the end of any line except one
  7207.               containing a text string value.  To do so, enter at least one
  7208.               space or tab after the value, a semicolon, and your comment,
  7209.               like this:
  7210.  
  7211.                    Environment = 2048        ;set standard environment size
  7212.  
  7213.               If you try to place a comment at the end of a string value,
  7214.               the comment will become part of the string and will probably
  7215.               cause an error.
  7216.  
  7217.               When 4DOS detects an error while processing the 4DOS.INI file,
  7218.               it displays an error message, ignores the line that caused the
  7219.               error, and prompts you to press a key to continue processing
  7220.               the file.  This allows you to note any errors before the
  7221.               startup process continues.  The directive in error will retain
  7222.               its previous or default value.  Only the most catastrophic
  7223.  
  7224.  
  7225.           ___________________________________________________________________
  7226.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  119
  7227.  
  7228.                                                CHAPTER 6 / OPTIONS AND TUNING
  7229.           ___________________________________________________________________
  7230.  
  7231.  
  7232.               errors (like a disk read failure) will cause 4DOS to ignore
  7233.               all or a large part of the 4DOS.INI file.  If you don't want
  7234.               4DOS to pause after each error, use a "PauseOnError = No"
  7235.               directive at the beginning of the file.
  7236.  
  7237.               The 4DOS.INI file has two sections, which are identified by a
  7238.               name in square brackets on a line by itself.  The section
  7239.               names are
  7240.  
  7241.                    [Primary]:  Directives in this section will be used when
  7242.                    4DOS is running as the primary shell.  The same values
  7243.                    will be passed automatically to all secondary shells,
  7244.                    unless overridden by a directive with the same name in
  7245.                    the [Secondary] section.
  7246.  
  7247.                    [Secondary]:  Directives in this section are used in
  7248.                    secondary shells only, and override any corresponding
  7249.                    primary shell settings.  For example, if your 4DOS.INI
  7250.                    file contains the lines:
  7251.  
  7252.                         ScreenRows = 25
  7253.                         [Secondary]
  7254.                         ScreenRows = 50
  7255.  
  7256.                    then 4DOS will assume that you have 25 rows on the screen
  7257.                    in the primary shell and 50 lines in all secondary
  7258.                    shells.
  7259.  
  7260.               Lines that precede a section name are used in both primary and
  7261.               secondary shells.
  7262.  
  7263.               The SETDOS command can override several of the 4DOS.INI file
  7264.               directives.  For example, the number of rows on the screen can
  7265.               be adjusted with SETDOS /R.  The correspondence between SETDOS
  7266.               options and INI file directives is noted under each directive
  7267.               below, and under each option of the SETDOS command.
  7268.  
  7269.               Secondary shells automatically inherit the configuration
  7270.               settings currently in effect in the previous shell.  If values
  7271.               have been changed by SETDOS since 4DOS started, the new values
  7272.               will be passed to the secondary shell.  If the previous
  7273.               shell's INI file had a [Secondary] section, it will then be
  7274.               read and processed.  If not, the previous shell's settings
  7275.               will remain in effect.  For example, if you set BatchEcho to
  7276.               Yes in 4DOS.INI, do not include a [Secondary] section, and use
  7277.               SETDOS /V0 to turn off batch file echoing in the primary
  7278.               shell, then secondary shells will inherit the SETDOS setting,
  7279.               i.e. batch files will default to no echo.
  7280.  
  7281.  
  7282.           ___________________________________________________________________
  7283.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  120
  7284.  
  7285.                                                CHAPTER 6 / OPTIONS AND TUNING
  7286.           ___________________________________________________________________
  7287.  
  7288.  
  7289.               If you want to force secondary shells to start with the same
  7290.               value as the primary shell for a particular directive,
  7291.               regardless of any changes made with SETDOS, repeat the
  7292.               directive in the [Secondary] section of 4DOS.INI.  You can
  7293.               also place the directive outside any section of 4DOS.INI, then
  7294.               include an empty [Secondary] section.  The inclusion of a
  7295.               [Secondary] section will force 4DOS to re-read 4DOS.INI, and
  7296.               the directives outside any section will be reprocessed as they
  7297.               apply to both primary and secondary shells.  Because 4DOS.INI
  7298.               is processed after values from the previous shell are
  7299.               inherited, the value in 4DOS.INI will override the inherited
  7300.               value.  Using the BatchEcho example above, either of the
  7301.               following sets of 4DOS.INI directives would work to ensure
  7302.               that BatchEcho is set to Yes in secondary shells:
  7303.  
  7304.                     Same directive                Empty
  7305.                     in both sections              [Secondary]
  7306.                     ----------------              -----------
  7307.                     [Primary]                     BatchEcho = Yes
  7308.                     BatchEcho = Yes                 ... <other
  7309.                      ... <other directives>         ...  directives>
  7310.                     [Secondary]                   [Secondary]
  7311.                     BatchEcho = Yes               <End of File>
  7312.                      ... <other directives>
  7313.  
  7314.               If you start a secondary shell from a task switching program
  7315.               like Windows, DESQView, or Back & Forth, you can specify an
  7316.               alternate location and name for 4DOS.INI by passing the
  7317.               "@d:\path\inifile" option to 4DOS as a command-line parameter
  7318.               (see page 111).  In this case, the configuration settings in
  7319.               the alternate 4DOS.INI file will supersede any settings
  7320.               inherited from the previous shell.  Any values which are not
  7321.               explicitly set in the alternate file will retain the value
  7322.               they had in the previous shell.  Any [Primary] section in the
  7323.               alternate file will be ignored because it is being run from a
  7324.               secondary shell.
  7325.  
  7326.               The first section below lists the different types of
  7327.               directives.  Subsequent sections list all the individual
  7328.               directives, divided by function and then alphabetically by
  7329.               directive name.  At the end we have included a few examples of
  7330.               how to use 4DOS.INI directives (see page 137).
  7331.  
  7332.  
  7333.  
  7334.  
  7335.  
  7336.  
  7337.  
  7338.  
  7339.           ___________________________________________________________________
  7340.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  121
  7341.  
  7342.                                                CHAPTER 6 / OPTIONS AND TUNING
  7343.           ___________________________________________________________________
  7344.  
  7345.  
  7346.               Types of Directives
  7347.  
  7348.               There are 8 types of directives in 4DOS.INI.  When you look at
  7349.               the descriptions below, you can tell the directive type by the
  7350.               way in which the allowable values are shown.
  7351.  
  7352.                    *  Name = nnnn (1234):  This directive takes a numeric
  7353.                       value which replaces the "nnnn."  The default value is
  7354.                       shown in parentheses.
  7355.  
  7356.                    *  Name = c (X):  This directive accepts a single
  7357.                       character as its value.  The default character is shown
  7358.                       in parentheses.  You must type in the actual character,
  7359.                       you can not use a key name.
  7360.  
  7361.                    *  Name = CHOICE1 | Choice2 | ... :  This directive takes
  7362.                       a choice value.  The possible choices are listed,
  7363.                       separated by vertical bars.  The default value is shown
  7364.                       in all upper case letters in the directive description,
  7365.                       but in your file any of the choices can be entered in
  7366.                       upper case or lower case.  The choices can be
  7367.                       abbreviated as long as the abbreviation is unique and
  7368.                       can not cause ambiguity.  For example, if the choices
  7369.                       were shown as "YES | No" then "YES" is the default.
  7370.                       You could enter "Y", "N", "y", or "n"  for the value.
  7371.                       But if the choices are shown as "YES | No | Never" then
  7372.                       you could not use "N" as an abbreviation because it
  7373.                       would be ambiguous.
  7374.  
  7375.                    *  Name = color:  This directive takes a color
  7376.                       specification in the form:
  7377.  
  7378.                         [BRIght] [BLInk] fg ON bg [BORder bc]
  7379.  
  7380.                       Where:
  7381.  
  7382.                          fg is the foreground color.
  7383.                          bg is the background color.
  7384.                          bc is the border color.
  7385.  
  7386.                       The allowable color names are:
  7387.                         Black         Blue          Green         Red
  7388.                         Magenta       Cyan          Yellow        White
  7389.  
  7390.                       The color names and the keywords BRIGHT, BLINK, and
  7391.                       BORDER can be shortened to three letters.
  7392.  
  7393.  
  7394.  
  7395.  
  7396.           ___________________________________________________________________
  7397.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  122
  7398.  
  7399.                                                CHAPTER 6 / OPTIONS AND TUNING
  7400.           ___________________________________________________________________
  7401.  
  7402.  
  7403.                    *  Name = Key:  This directive takes a key specification
  7404.                       in the form:
  7405.  
  7406.                         [Prefix-]Keyname
  7407.  
  7408.                       The key prefix can be left out, or it can be any one of
  7409.                       the following:
  7410.  
  7411.                         Alt        followed by A - Z, 0 - 9, F1 - F12, or
  7412.                                    Bksp
  7413.                         Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  7414.                                    Left, Right, Home, End, PgUp, PgDn, Ins,
  7415.                                    or Del
  7416.                         Shift      followed by F1 - F12 or Tab.
  7417.  
  7418.                       The possible key names are:
  7419.                         A - Z         Enter         PgDn
  7420.                         0 - 9         Up            Home
  7421.                         F1 - F12      Down          End
  7422.                         Esc           Left          Ins
  7423.                         Bksp          Right         Del
  7424.                         Tab           PgUp
  7425.  
  7426.                       All key names must be spelled as shown, and can be
  7427.                       abbreviated as long as the abbreviation is unique and
  7428.                       unambiguous.  Alphabetic keys can be specified in
  7429.                       upper-case or lower-case.  You cannot specify a
  7430.                       punctuation key.
  7431.  
  7432.                       The prefix and key name must be separated by a dash.
  7433.                       For example,
  7434.  
  7435.                         AddFile = Alt-F10    ; This is okay
  7436.                         AddFile = Alt F10    ; The space will cause an error
  7437.  
  7438.                       If you prefer, you can use a numeric value instead of a
  7439.                       key name.  Use the ASCII code for an ASCII, extended
  7440.                       ASCII, or control character.  Use the scan code
  7441.                       preceded by an at-sign [@] for extended key codes like
  7442.                       F1 or the cursor keys.  In general, you will find it
  7443.                       easier to use the names described above rather than key
  7444.                       numbers.
  7445.  
  7446.                    *  Name = Path:  This directive takes a path
  7447.                       specification, but not a filename.  The path should
  7448.                       include both a drive and path (e.g., C:\4DOS) to avoid
  7449.                       any possible ambiguities.  A trailing backslash [\] at
  7450.  
  7451.  
  7452.  
  7453.           ___________________________________________________________________
  7454.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  123
  7455.  
  7456.                                                CHAPTER 6 / OPTIONS AND TUNING
  7457.           ___________________________________________________________________
  7458.  
  7459.  
  7460.                       the end of the path name is acceptable but not
  7461.                       required.  Any default path is described in the text.
  7462.  
  7463.                    *  Name = File:  This directive takes a filename.  We
  7464.                       recommend that you use a full filename including the
  7465.                       drive letter and path to avoid any possible
  7466.                       ambiguities.  Any default filename is described in the
  7467.                       text.
  7468.  
  7469.                    *  Name = Anything else:  This directive takes a string in
  7470.                       the format shown.  The text describes the default value
  7471.                       and any additional requirements for formatting the
  7472.                       string correctly.  No comments are allowed.
  7473.  
  7474.               4DOS contains a fixed-length area for storing strings entered
  7475.               in 4DOS.INI, including file names, paths, and other strings.
  7476.               This area is large and is unlikely to overflow; if it does,
  7477.               you will receive an error message.  If this occurs, reduce the
  7478.               complexity of your 4DOS.INI file or contact our technical
  7479.               support department for assistance.
  7480.  
  7481.  
  7482.               Initialization Directives
  7483.  
  7484.               The directives in this section control how 4DOS starts and
  7485.               where it looks for its files.
  7486.  
  7487.                    4StartPath = Path:  Sets the drive and directory where
  7488.                    4DOS should look for the 4START and 4EXIT batch files.
  7489.  
  7490.                    Alias = nnnn  (1024):  Sets the amount of memory in bytes
  7491.                    allocated for the alias list.  The allowable range of
  7492.                    values is 256 to 32767 bytes.
  7493.  
  7494.                    AutoExecPath = Path:  Sets the path used to find
  7495.                    AUTOEXEC.BAT if 4DOS is started as a primary shell with
  7496.                    the /P option in CONFIG.SYS (see page 111).  The default
  7497.                    is the root directory of the boot drive.
  7498.  
  7499.                    Environment = nnnn  (512):  Sets the amount of memory
  7500.                    allocated to the environment in bytes.  The allowable
  7501.                    range of values is 256 to 32000 bytes.
  7502.  
  7503.                    EnvFree = nnnn  (128):  Sets the minimum amount of memory
  7504.                    in bytes that will be available in the environment for
  7505.                    secondary shells.  4DOS will enlarge the environment for
  7506.                    each secondary shell, if necessary, so that there is at
  7507.                    least this much free environment space when the shell
  7508.  
  7509.  
  7510.           ___________________________________________________________________
  7511.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  124
  7512.  
  7513.                                                CHAPTER 6 / OPTIONS AND TUNING
  7514.           ___________________________________________________________________
  7515.  
  7516.  
  7517.                    starts.  The allowable range of values is 128 to 32000
  7518.                    bytes.
  7519.  
  7520.                    HelpOptions = [/M /Sn /X]:  Sets default options for the
  7521.                    4DOS help system.  See HELP on page 234 for a list of the
  7522.                    available options.
  7523.  
  7524.                    HelpPath = Path:  Sets the path used to find 4HELP.EXE
  7525.                    when F1 is pressed or the HELP command is used.  If this
  7526.                    directive is not used, 4DOS will search the current
  7527.                    directory and each of the directories in the PATH.
  7528.  
  7529.                    History = nnnn  (1024):  Sets the amount of memory
  7530.                    allocated to the history list in bytes.  The allowable
  7531.                    range of values is 512 to 8192 bytes.
  7532.  
  7533.                    LogName = File  (none):  Sets the log file name and/or
  7534.                    path. If only a path is given, 4DOS will use the default
  7535.                    log file name (4DOSLOG).  Using LogName does not turn
  7536.                    logging on, you must still use LOG ON to do so.
  7537.  
  7538.                    PauseOnError = YES | No:  "Yes" tells 4DOS to pause with
  7539.                    the message "Error in 4DOS.INI, press any key to continue
  7540.                    processing" after displaying any error message related to
  7541.                    a specific line in the 4DOS.INI file.  "No" continues
  7542.                    processing with no pause after an error message is
  7543.                    displayed.
  7544.  
  7545.                    Swapping = swap type [, swap type] ...:  Sets the type of
  7546.                    swapping 4DOS should use.  4DOS runs in two parts, a
  7547.                    resident portion that is always in memory and a transient
  7548.                    portion that can be stored in EMS memory, in XMS memory,
  7549.                    on a RAM disk, or on your hard disk while application
  7550.                    programs are running.  The resident portion uses about 3K
  7551.                    of memory in the primary shell and about 1.5K in
  7552.                    secondary shells.  The transient portion uses about 88K
  7553.                    of memory.  4DOS will perform most quickly if the
  7554.                    transient portion is swapped to the fastest memory or
  7555.                    device available.  See page 49 for explanations of XMS
  7556.                    and EMS memory.
  7557.  
  7558.                    Swapping for the primary shell normally requires about
  7559.                    96K of EMS memory, or 88K of XMS memory or disk space.
  7560.                    Secondary shells normally require 32K of EMS memory, or
  7561.                    28K of XMS memory or disk space.  If you have a large
  7562.                    environment, alias list, or history list, more memory
  7563.                    will be required in both primary and secondary shells.
  7564.                    The EMS requirements are larger because EMS memory is
  7565.  
  7566.  
  7567.           ___________________________________________________________________
  7568.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  125
  7569.  
  7570.                                                CHAPTER 6 / OPTIONS AND TUNING
  7571.           ___________________________________________________________________
  7572.  
  7573.  
  7574.                    allocated in 16K increments; 4DOS does not actually use
  7575.                    more memory when swapping to EMS.
  7576.  
  7577.                    The swap type may be:
  7578.  
  7579.                          EMS:  4DOS will swap to EMS expanded memory if it is
  7580.                          available.  You must have expanded memory and an EMS
  7581.                          memory manager (version 3.2 or later) for this
  7582.                          option.
  7583.  
  7584.                          XMS:  4DOS will swap to XMS extended memory if it is
  7585.                          available (you must have an 80286, 386, or 486
  7586.                          computer for this option, and an XMS memory
  7587.                          manager).
  7588.  
  7589.                          d:\path:  4DOS will create a swap file in the drive
  7590.                          and directory specified.  The file will be called
  7591.                          4DOSSWAP.NNN where "NNN" is the shell number.  This
  7592.                          swap file is created as a hidden system file to
  7593.                          avoid accidental deletion and will not be visible
  7594.                          with a normal DIR command.  Swapping to a RAM disk
  7595.                          will generally be somewhat faster than swapping to a
  7596.                          hard disk.  Do not use a floppy disk for swapping
  7597.                          because its performance is likely to be unacceptably
  7598.                          slow.
  7599.  
  7600.                          None:  No swapping.  The transient portion of 4DOS
  7601.                          will remain in memory at all times.  This option
  7602.                          will reduce memory available for application
  7603.                          programs by about 90K compared to the other swap
  7604.                          types, and should be used only when no other
  7605.                          swapping options are available.
  7606.  
  7607.                    You can specify multiple swap types and 4DOS will try
  7608.                    them in the order listed.  Swap type "None" is always
  7609.                    appended to your list of possible swap types as a "last
  7610.                    resort", even if you don't include it explicitly.  This
  7611.                    allows 4DOS to start even if the other swap types you
  7612.                    specify don't work.
  7613.  
  7614.                    For example, if your system has EMS memory and a RAM disk
  7615.                    set up as drive D, the directive:
  7616.  
  7617.                          Swapping = EMS, D:\, C:\SWAP
  7618.  
  7619.                    will tell 4DOS to try EMS memory first, then the RAM
  7620.                    disk, and finally the \SWAP directory on drive C.  If all
  7621.                    of these options fail (because there isn't enough free
  7622.  
  7623.  
  7624.           ___________________________________________________________________
  7625.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  126
  7626.  
  7627.                                                CHAPTER 6 / OPTIONS AND TUNING
  7628.           ___________________________________________________________________
  7629.  
  7630.  
  7631.                    space available), the transient portion of 4DOS will
  7632.                    remain in memory (swap type "None").
  7633.  
  7634.                    The default Swapping specification is:
  7635.  
  7636.                          Swapping = EMS, XMS, x:\, None
  7637.  
  7638.                    "x" is the boot drive (for the primary shell) or the
  7639.                    COMSPEC drive (for secondary shells).  (Disk swapping
  7640.                    will not be included as a default if the boot drive is A:
  7641.                    or B:, because floppy disk swapping is too slow to be
  7642.                    useful on most systems.)  The default is usually adequate
  7643.                    for most systems.
  7644.  
  7645.                    UMBEnvironment = Yes | NO:  "Yes" attempts to load the
  7646.                    master environment into a UMB (Upper Memory Block).  This
  7647.                    reduces 4DOS's base memory requirements but may cause
  7648.                    problems with some programs that try to access the master
  7649.                    environment directly.  This option requires an 80286,
  7650.                    386, or 486 computer and appropriate support software.
  7651.                    (See pages 50 and 140 for more information on UMBs.)
  7652.  
  7653.                    UMBLoad = Yes | NO:  "Yes" attempts to load the resident
  7654.                    portion of 4DOS into a UMB (Upper Memory Block).  This
  7655.                    reduces the size of the resident portion in base memory
  7656.                    from about 3K bytes to 256 bytes, plus the environment
  7657.                    size (unless you have also enabled UMBEnvironment).  This
  7658.                    option requires an 80286, 386, or 486 computer and
  7659.                    appropriate support software.  (See pages 50 and 140 for
  7660.                    more information on UMBs.)
  7661.  
  7662.  
  7663.               Configuration Directives
  7664.  
  7665.               These directives control the way that 4DOS operates.  Some can
  7666.               be changed with the SETDOS command while 4DOS is running.  Any
  7667.               corresponding SETDOS command is listed in the description of
  7668.               each directive;  information on SETDOS is on page 294.
  7669.  
  7670.                    ANSI = AUTO | Yes | No:  Tells 4DOS whether an ANSI
  7671.                    driver is installed and should be used for the CLS and
  7672.                    COLOR commands.  4DOS normally determines this itself,
  7673.                    but if you are using a non-standard ANSI driver or your
  7674.                    loading sequence is unusual, you may need to explicitly
  7675.                    inform 4DOS.  Also see SETDOS /A.
  7676.  
  7677.                    BatchEcho = YES | No:  Sets the default batch ECHO mode.
  7678.                    "Yes" enables echoing of all batch file commands unless
  7679.  
  7680.  
  7681.           ___________________________________________________________________
  7682.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  127
  7683.  
  7684.                                                CHAPTER 6 / OPTIONS AND TUNING
  7685.           ___________________________________________________________________
  7686.  
  7687.  
  7688.                    ECHO is explicitly set off in the batch file.  "No"
  7689.                    disables batch file echoing unless ECHO is explicitly set
  7690.                    on.  Also see SETDOS /V.
  7691.  
  7692.                    BeepFreq = nnnn  (440):  Sets the default BEEP command
  7693.                    frequency in Hz.  This is also the frequency for 4DOS
  7694.                    "error" beeps (if you press an illegal key, for example).
  7695.                    To disable all 4DOS error beeps set this or BeepLength to
  7696.                    0;  if you do the BEEP command will still be operable,
  7697.                    but will not produce sound unless you explicitly specify
  7698.                    the frequency and duration.
  7699.  
  7700.                    BeepLength = nnnn  (2):  Sets the default BEEP length in
  7701.                    system clock ticks (approximately 1/18 of a second per
  7702.                    tick).  BeepLength is also the default length for 4DOS
  7703.                    "error" beeps (if you press an illegal key, for example).
  7704.  
  7705.                    CursorIns = nnnn  (100):  This is the shape of the cursor
  7706.                    for insert mode during command line editing and all
  7707.                    commands which accept line input (DESCRIBE, ESET, etc.).
  7708.                    The size is a percentage of the total character cell
  7709.                    size, between 0% and 100%.  Because of the way video
  7710.                    BIOSes map the cursor shape, you may not get a smooth
  7711.                    progression in cursor shapes as CursorIns and CursorOver
  7712.                    change.  Also see SETDOS /S.
  7713.  
  7714.                    CursorOver = nnnn  (10):  This is the shape of the cursor
  7715.                    for overtype mode during command line editing and all
  7716.                    commands which accept line input.  The size is a
  7717.                    percentage of the total character cell size, between 0%
  7718.                    and 100%.  Also see SETDOS /S.
  7719.  
  7720.                    CommandSep = c  (^):  This is the character used to
  7721.                    separate multiple commands on the same line.  You cannot
  7722.                    use any of the redirection characters (| > < ) or any of
  7723.                    the whitespace characters (space, tab, comma, or equal
  7724.                    sign).  Also see SETDOS /C.
  7725.  
  7726.                    EditMode = Insert | OVERSTRIKE:  This directive lets you
  7727.                    start the command line editor in either insert or
  7728.                    overstrike mode.  Also see SETDOS /M.
  7729.  
  7730.                    EscapeChar = c  (Ctrl-X):  Sets the character used to
  7731.                    suppress the normal meaning of the following character.
  7732.                    See page 93 for a description of the escape character and
  7733.                    special escape sequences.  You cannot use any of the
  7734.                    redirection characters (| > < ) or the whitespace
  7735.  
  7736.  
  7737.  
  7738.           ___________________________________________________________________
  7739.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  128
  7740.  
  7741.                                                CHAPTER 6 / OPTIONS AND TUNING
  7742.           ___________________________________________________________________
  7743.  
  7744.  
  7745.                    characters (space, tab, comma, or equal sign) as the
  7746.                    escape character.  Also see SETDOS /E.
  7747.  
  7748.                    HistMin = nnnn  (0):  Sets the minimum command line size
  7749.                    to save in the command history list.  Any command line
  7750.                    whose length is less than this value will not be saved.
  7751.                    Legal values range from 0 (save everything) to 256
  7752.                    (disable all command history saves).
  7753.  
  7754.                    HistWinColor = Color:  Sets the default colors for the
  7755.                    command line history window.  If this directive is not
  7756.                    used the colors will be reversed from the current colors
  7757.                    on the screen.
  7758.  
  7759.                    HistWinHeight = nn (10):  Sets the height of the command
  7760.                    line history window in lines, including the border.
  7761.                    Legal values range from 5 to the height of your screen;
  7762.                    any value which would cause the bottom of the window to
  7763.                    be off the screen will be adjusted so that the entire
  7764.                    window remains on the screen.
  7765.  
  7766.                    HistWinLeft = nn (50):  Sets the horizontal position of
  7767.                    the left side of the command line history window.  Legal
  7768.                    values range from 0 (the left edge of the screen) to the
  7769.                    number of columns on your screen minus 10.  Any value
  7770.                    which would cause the right side of a minimum-width
  7771.                    window to be off the screen will be adjusted so that the
  7772.                    entire window remains on the screen.
  7773.  
  7774.                    HistWinTop = nn (0):  Sets the vertical position of the
  7775.                    top of the command line history window.  Legal values
  7776.                    range from 0 (the top of the screen) to the number of
  7777.                    rows on your screen minus 5.  Any value which would cause
  7778.                    the bottom of a minimum-height window to be off the
  7779.                    screen will be adjusted so that the entire window remains
  7780.                    on the screen.
  7781.  
  7782.                    HistWinWidth = nn (30):  Sets the width of the command
  7783.                    line history window in characters, including the border.
  7784.                    Legal values range from 10 to the width of your screen;
  7785.                    any value which would cause the right side of the window
  7786.                    to be off the screen will be adjusted so that the entire
  7787.                    window remains on the screen.
  7788.  
  7789.                    LineInput = Yes | NO:  This directive controls how 4DOS
  7790.                    gets its input from the command line.  "Yes" forces 4DOS
  7791.                    to use line input via the DOS service INT 21H 0AH "Get
  7792.                    Line" which is the way that COMMAND.COM gets input.  This
  7793.  
  7794.  
  7795.           ___________________________________________________________________
  7796.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  129
  7797.  
  7798.                                                CHAPTER 6 / OPTIONS AND TUNING
  7799.           ___________________________________________________________________
  7800.  
  7801.  
  7802.                    will disable command-line editing, history recall, and
  7803.                    filename completion, and is normally used only for rare
  7804.                    memory-resident programs (TSRs) which do not work
  7805.                    properly unless the command processor uses line input.
  7806.                    If you have a particular program that requires line
  7807.                    input, you can use SETDOS /L to temporarily change modes.
  7808.                    See APPNOTES.DOC for any specific programs which require
  7809.                    this option.
  7810.  
  7811.                    NoClobber = Yes | NO:  If set to Yes, will prevent
  7812.                    standard output redirection (see page 65) from
  7813.                    overwriting an existing file, and will require that the
  7814.                    output file already exist for append redirection.  Also
  7815.                    see SETDOS /N.
  7816.  
  7817.                    ScreenRows = nnnn:  Sets the number of screen rows used
  7818.                    by the video display.  Normally, 4DOS detects the screen
  7819.                    size automatically, but if you have a non-standard
  7820.                    display you may need to set it explicitly.  This value
  7821.                    does not affect screen scrolling, which is controlled by
  7822.                    your video BIOS or ANSI driver.  ScreenRows is used only
  7823.                    by the LIST and SELECT commands, the paged output options
  7824.                    of other commands (e.g., TYPE /P), and error checking in
  7825.                    the screen output commands.  Also see SETDOS /R.
  7826.  
  7827.                    UpperCase = Yes | NO:  "Yes" specifies that filenames
  7828.                    should be displayed in the traditional upper-case by
  7829.                    internal commands like COPY and DIR.  "No" allows the
  7830.                    normal 4DOS lower-case style.  Also see SETDOS /U.
  7831.  
  7832.  
  7833.               Color Directives
  7834.  
  7835.               These directives control the colors that 4DOS uses for its
  7836.               displays.
  7837.  
  7838.                    ColorDir = ext1 ext2 ...:colora;ext3 ext4 ... :colorb ...
  7839.                    (none):  Sets the directory colors.  The format is the
  7840.                    same as that used for the COLORDIR environment variable
  7841.                    (see DIR on page 204 or SELECT on page 286).  If you set
  7842.                    the COLORDIR environment variable it will override this
  7843.                    directive.  You may find it useful to use the COLORDIR
  7844.                    variable for experimenting, then to set permanent
  7845.                    directory colors with a ColorDir directive in 4DOS.INI.
  7846.  
  7847.                    ListColors = Color:  Sets the colors used by the LIST and
  7848.                    SELECT commands.  If this directive is not used, LIST and
  7849.  
  7850.  
  7851.  
  7852.           ___________________________________________________________________
  7853.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  130
  7854.  
  7855.                                                CHAPTER 6 / OPTIONS AND TUNING
  7856.           ___________________________________________________________________
  7857.  
  7858.  
  7859.                    SELECT will use the current default colors set by the CLS
  7860.                    or COLOR command or by the StdColors directive, below.
  7861.  
  7862.                    StdColors = Color:  Sets the standard colors to be used
  7863.                    when CLS is used without a color specification, and for
  7864.                    LIST and SELECT if ListColors is not used.  Using this
  7865.                    directive is equivalent to placing a COLOR command in
  7866.                    AUTOEXEC.BAT.  StdColors takes effect once the transient
  7867.                    portion of 4DOS starts (i.e., when 4START is run), but
  7868.                    will not affect the color of error or other messages
  7869.                    displayed during the 4DOS loading and initialization
  7870.                    process.    If ANSI.SYS or a compatible driver is not
  7871.                    loaded, the colors will not be "sticky" -- you may lose
  7872.                    them when you run an application.
  7873.  
  7874.  
  7875.               Key Mapping Directives
  7876.  
  7877.               The directives in this group allow you to change the keys used
  7878.               for 4DOS command line editing and other internal functions.
  7879.               They take effect only inside 4DOS itself and do not affect
  7880.               other programs (including 4DOS's external help program,
  7881.               4HELP.EXE).
  7882.  
  7883.               The description of each directive below explains the function
  7884.               of the corresponding key.  Using the directive allows you to
  7885.               assign a different or additional key to perform the function
  7886.               described.  For example, to assign function key F3 to invoke
  7887.               the 4DOS HELP facility:
  7888.  
  7889.                    Help = F3
  7890.  
  7891.               Any directive can be used multiple times to assign multiple
  7892.               keys to the same function.  For example:
  7893.  
  7894.                    ListFind = F         ;F does a find in LIST
  7895.                    ListFind = F5        ;F5 also does a find in LIST
  7896.  
  7897.               Use some care when you reassign keystrokes.  If you assign a
  7898.               default key to a different function, it will no longer be
  7899.               available for its original use.  For example, if you assign F1
  7900.               to the AddFile directive (a part of filename completion), the
  7901.               F1 key will no longer invoke 4DOS's HELP facility, so you will
  7902.               probably want to assign a different key to HELP.
  7903.  
  7904.               Some keys are interpreted by your system's BIOS and are not
  7905.               passed on to 4DOS.  For example, Ctrl-S tells the BIOS to
  7906.               pause screen output temporarily, and on some systems Ctrl-P
  7907.  
  7908.  
  7909.           ___________________________________________________________________
  7910.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  131
  7911.  
  7912.                                                CHAPTER 6 / OPTIONS AND TUNING
  7913.           ___________________________________________________________________
  7914.  
  7915.  
  7916.               toggles Print Screen mode.  Keys which are interpreted by the
  7917.               BIOS cannot be assigned with key mapping directives, because
  7918.               4DOS never receives these keystrokes and therefore cannot act
  7919.               on them.
  7920.  
  7921.               4DOS processes all command line editing key assignments before
  7922.               looking for keystroke aliases.  For example, if you assign
  7923.               Shift-F1 to HELP and also assign Shift-F1 to a key alias, the
  7924.               key alias will be ignored.
  7925.  
  7926.               Assigning a new keystroke for a function does not deassign the
  7927.               default keystroke for the same function.  If you want to
  7928.               deassign one of the standard 4DOS keys without assigning it to
  7929.               another function, use the NormalKey directive described below
  7930.               or the corresponding directive for keys in the other key
  7931.               groups (NormalEditKey, NormalHWinKey, or NormalListKey).
  7932.  
  7933.               General Input Keys
  7934.  
  7935.                    This first set of Key Mapping Directives applies to all
  7936.                    input.  These directives are effective whenever 4DOS
  7937.                    requests input from the keyboard, including command line
  7938.                    editing and the DESCRIBE, ESET, INPUT, LIST, and SELECT
  7939.                    commands.  (Scrolling through the command history list is
  7940.                    controlled by NextHist and PrevHist (see page 134), not
  7941.                    by the Up and Down directives below.)  See page 55 for
  7942.                    more information about command line editing.
  7943.  
  7944.                    Backspace = Key  (Bksp):  Deletes the character to the
  7945.                    left of the cursor.
  7946.  
  7947.                    BeginLine = Key  (Home):  Moves the cursor to the
  7948.                    beginning of the line.
  7949.  
  7950.                    Del = Key  (Del):  Deletes the character at the cursor.
  7951.  
  7952.                    DelToBeginning = Key (Ctrl-Home):  Deletes from the
  7953.                    cursor to the start of the line.
  7954.  
  7955.                    DelToEnd = Key (Ctrl-End):  Deletes from the cursor to
  7956.                    the end of the line.
  7957.  
  7958.                    DelWordLeft = Key  (Ctrl-L):  Deletes the word to the
  7959.                    left of the cursor.
  7960.  
  7961.                    DelWordRight = Key  (Ctrl-R, Ctrl-Bksp):  Deletes the
  7962.                    word to the right of the cursor.
  7963.  
  7964.  
  7965.  
  7966.           ___________________________________________________________________
  7967.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  132
  7968.  
  7969.                                                CHAPTER 6 / OPTIONS AND TUNING
  7970.           ___________________________________________________________________
  7971.  
  7972.  
  7973.                    Down = Key  (Down):  Scrolls the display down one line in
  7974.                    LIST; moves the cursor down one line in SELECT and in the
  7975.                    command history window.
  7976.  
  7977.                    EndLine = Key  (End):  Moves the cursor to the end of the
  7978.                    line.
  7979.  
  7980.                    EraseLine = Key  (Esc):  Deletes the entire line.
  7981.  
  7982.                    ExecLine = Key (Enter):  Executes or accepts a line.
  7983.  
  7984.                    Ins = Key (Ins):  Toggles insert / overstrike mode during
  7985.                    line editing.
  7986.  
  7987.                    Left = Key  (Left):  Moves the cursor left one character;
  7988.                    moves the display left 8 columns in LIST.
  7989.  
  7990.                    NormalKey = Key (none):  Deassigns a general input key in
  7991.                    order to disable the usual meaning of the key within 4DOS
  7992.                    and / or make it available for keystroke aliases.  This
  7993.                    will cause 4DOS to treat the keystroke as a "normal" key
  7994.                    with no special function.  For example:
  7995.  
  7996.                         NormalKey = Ctrl-End
  7997.  
  7998.                    will disable Ctrl-End, which is the standard "delete to
  7999.                    beginning of line" key.  Ctrl-End could then be assigned
  8000.                    to a keystroke alias.  Another key could be assigned the
  8001.                    "delete to end of line" function with the DelToEnd
  8002.                    directive (above).
  8003.  
  8004.                    Right = Key  (Right):  Moves the cursor right one
  8005.                    character;  scrolls the display right 8 columns in LIST.
  8006.  
  8007.                    Up = Key  (Up):  Scrolls the display up one line in LIST;
  8008.                    moves the cursor up one line in SELECT and in the command
  8009.                    history window.
  8010.  
  8011.                    WordLeft = Key  (Ctrl-Left):  Moves the cursor left one
  8012.                    word;  scrolls the display left 40 columns in LIST.
  8013.  
  8014.                    WordRight = Key  (Ctrl-Right):  Moves the cursor right
  8015.                    one word;  scrolls the display right 40 columns in LIST.
  8016.  
  8017.  
  8018.  
  8019.  
  8020.  
  8021.  
  8022.  
  8023.           ___________________________________________________________________
  8024.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  133
  8025.  
  8026.                                                CHAPTER 6 / OPTIONS AND TUNING
  8027.           ___________________________________________________________________
  8028.  
  8029.  
  8030.               Command Line Editing Keys
  8031.  
  8032.                    The following directives apply only to command line
  8033.                    editing.  They are only effective at the 4DOS prompt.
  8034.  
  8035.                    AddFile = Key  (F10):  Keeps the current filename
  8036.                    completion entry and inserts the next matching name.
  8037.  
  8038.                    CommandEscape = Key  (Alt-255):  Allows direct entry of a
  8039.                    keystroke that would normally be interpreted as an editor
  8040.                    command.
  8041.  
  8042.                    DelHistory = Key  (Ctrl-D):  Deletes the displayed
  8043.                    history list entry and displays the previous entry.
  8044.  
  8045.                    EndHistory = Key  (Ctrl-E):  Displays the last entry in
  8046.                    the history list.
  8047.  
  8048.                    Help = Key  (F1):  Invokes the 4DOS HELP facility.
  8049.  
  8050.                    NextFile = Key  (F9, Tab):  Gets the next matching
  8051.                    filename.
  8052.  
  8053.                    NextHistory = Key  (Down):  Recalls the next command from
  8054.                    the command history.
  8055.  
  8056.                    NormalEditKey = Key (none):  Deassigns a command line
  8057.                    editing key in order to disable the usual meaning of the
  8058.                    key while editing a command line and / or make it
  8059.                    available for keystroke aliases.  This will cause 4DOS to
  8060.                    treat the keystroke as a "normal" key with no special
  8061.                    function.  For an example see the NormalKey directive on
  8062.                    page 133.
  8063.  
  8064.                    PrevFile = Key  (F8, Shift-Tab):  Gets the previous
  8065.                    matching filename.
  8066.  
  8067.                    PrevHistory = Key  (Up):  Recalls the previous command
  8068.                    from the command history.
  8069.  
  8070.                    SaveHistory = Key  (Ctrl-K):  Saves the command line in
  8071.                    the history list without executing it.
  8072.  
  8073.  
  8074.               History Window Keys
  8075.  
  8076.                    HistWinBegin = Key (Ctrl-PgUp):  Moves to the first line
  8077.                    of the history when in the history window.
  8078.  
  8079.  
  8080.           ___________________________________________________________________
  8081.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  134
  8082.  
  8083.                                                CHAPTER 6 / OPTIONS AND TUNING
  8084.           ___________________________________________________________________
  8085.  
  8086.  
  8087.                    HistWinEdit = Key (Ctrl-Enter):  Moves a line from the
  8088.                    history window to the prompt for editing.
  8089.  
  8090.                    HistWinEnd = Key (Ctrl-PgDn):  Moves to the last line of
  8091.                    the history when in the history window.
  8092.  
  8093.                    HistWinExec = Key (Enter):  Executes the selected line in
  8094.                    the history window.
  8095.  
  8096.                    HistWinOpen = Key (PgUp):  Brings up the history window
  8097.                    while at the command line.
  8098.  
  8099.                    NormalHWinKey = Key (none):  Deassigns a history window
  8100.                    key in order to disable the usual meaning of the key
  8101.                    within the history window.  This will cause 4DOS to treat
  8102.                    the keystroke as a "normal" key with no special function.
  8103.                    For an example see the NormalKey directive on page 133.
  8104.  
  8105.  
  8106.               LIST Keys
  8107.  
  8108.                    The keys in the last group of Key Mapping Directives are
  8109.                    effective only inside the LIST command.
  8110.  
  8111.                    ListFind = Key  (F):  Prompts and searches for a string.
  8112.  
  8113.                    ListHighBit = Key (H):  Toggles LIST's "strip high bit"
  8114.                    option, which can aid in displaying files from certain
  8115.                    word processors.
  8116.  
  8117.                    ListNext = Key  (N):  Finds the next matching string.
  8118.  
  8119.                    ListPrint = Key  (P):  Prints the file on LPT1.
  8120.  
  8121.                    ListWrap = Key (W):  Toggles LIST's wrap option on and
  8122.                    off.  The wrap option wraps text at the right margin.
  8123.  
  8124.                    NormalListKey = Key (none):  Deassigns a LIST key in
  8125.                    order to disable the usual meaning of the key within
  8126.                    LIST.  This will cause 4DOS to treat the keystroke as a
  8127.                    "normal" key with no special function.  For an example
  8128.                    see the NormalKey directive on page 133.
  8129.  
  8130.  
  8131.               Advanced Directives
  8132.  
  8133.               These directives are used for unusual circumstances or for
  8134.               diagnosing problems.  They are not needed in normal use.
  8135.  
  8136.  
  8137.           ___________________________________________________________________
  8138.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  135
  8139.  
  8140.                                                CHAPTER 6 / OPTIONS AND TUNING
  8141.           ___________________________________________________________________
  8142.  
  8143.  
  8144.                    CritFail = Yes | NO:  This is the same as /F on the SHELL
  8145.                    = line in CONFIG.SYS.  It intercepts all DOS critical
  8146.                    errors and returns a Fail to each.  We do not recommend
  8147.                    this on a normal system, because you will not have a
  8148.                    chance to react to a critical error and correct the
  8149.                    problem that caused it.  It is intended for use on
  8150.                    bulletin boards or other systems where unattended
  8151.                    operation is required without user prompts.
  8152.  
  8153.                    FineSwap = Yes | NO:  "Yes" enables "fine-grained"
  8154.                    checksums during disk swapping.  This should be used only
  8155.                    to diagnose unusual swapping problems.
  8156.  
  8157.                    FullINT2E = Yes | NO:  Enables full support for the
  8158.                    COMMAND.COM "back door" (interrupt 2E) which a few
  8159.                    programs use to execute commands.  Effective only in a
  8160.                    primary shell loaded via the SHELL= command in
  8161.                    CONFIG.SYS.  See Appendix C on page 335 below for details
  8162.                    on using INT 2E.  Also, see APPNOTES.DOC for information
  8163.                    on any programs known to require this option.  If this
  8164.                    directive is not used or is set to NO, INT 2E will return
  8165.                    immediately to the calling program without taking any
  8166.                    action.  Setting FullINT2E to YES adds about 100 bytes to
  8167.                    the resident size of the primary shell.
  8168.  
  8169.                    Inherit = YES | No:  Aliases and the history list are
  8170.                    normally passed to secondary shells automatically.  "No"
  8171.                    disables this feature.
  8172.  
  8173.                    MessageServer = YES | No:  For compatibility with
  8174.                    COMMAND.COM in MS-DOS 4.x and 5.x, 4DOS includes a
  8175.                    "message server" that retrieves error message text for
  8176.                    DOS external commands like DISKCOPY and FORMAT.  The
  8177.                    message server increases the size of the resident portion
  8178.                    of 4DOS by about 200 bytes.  "No" disables the message
  8179.                    server and saves this space, but will cause more cryptic
  8180.                    error messages such as "Parse error 3" or "Extended error
  8181.                    7" from some DOS external commands.  The message server
  8182.                    is automatically disabled by 4DOS except in the primary
  8183.                    4DOS shell loaded from CONFIG.SYS when running under DOS
  8184.                    4.x or 5.x.
  8185.  
  8186.                    Reduce = YES | No:  Set to "No" to disable the smaller
  8187.                    swap size used by 4DOS secondary shells.  For diagnosing
  8188.                    unusual swapping problems only.
  8189.  
  8190.                    ReserveTPA = YES | No:  Set to "No" to prevent 4DOS from
  8191.                    reserving memory for its transient portion while at the
  8192.  
  8193.  
  8194.           ___________________________________________________________________
  8195.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  136
  8196.  
  8197.                                                CHAPTER 6 / OPTIONS AND TUNING
  8198.           ___________________________________________________________________
  8199.  
  8200.  
  8201.                    command prompt.  For diagnosing unusual TSR or swapping
  8202.                    problems only.  ReserveTPA is forced to YES regardless of
  8203.                    any INI file setting if you are running under Windows 3
  8204.                    in real or standard mode.  This is necessary to avoid
  8205.                    undesirable interactions between 4DOS and Windows.
  8206.  
  8207.                    StackSize= nnnn (3584):  Set the 4DOS internal stack
  8208.                    size.  The allowable range of values is 3584 to 8192.
  8209.                    You may need to increase the stack size if you are using
  8210.                    extremely complex combinations of batch files and nested
  8211.                    "prefix" commands like EXCEPT, FOR, GLOBAL, IF, and
  8212.                    SELECT on the same command line.  Under such
  8213.                    circumstances 4DOS may not work properly; you should only
  8214.                    use this directive if you are actually experiencing
  8215.                    trouble under such conditions.  For virtually all users
  8216.                    the default stack size will be sufficient.  Increasing
  8217.                    this value also increases the size of 4DOS's transient
  8218.                    portion and the size of the 4DOS swap area.
  8219.  
  8220.                    SwapReopen = Yes | NO:  Set to "Yes" to enable reopening
  8221.                    of the 4DOS swap file if it is closed by another program.
  8222.                    This is required when swapping 4DOS to Novell Netware
  8223.                    drives.  In all other circumstances, it is only useful
  8224.                    for diagnostic purposes.  Setting SwapReopen to "Yes"
  8225.                    also disables the reduced swapping size normally used in
  8226.                    4DOS secondary shells.
  8227.  
  8228.  
  8229.               Examples
  8230.  
  8231.               The following examples will give you an idea of the types of
  8232.               things that can be done with the 4DOS.INI file.  The comments
  8233.               on each directive explain what it does.
  8234.  
  8235.               First, a very simple example that just sets up swapping and
  8236.               environment size, leaving everything else at its default
  8237.               value:
  8238.  
  8239.                    Swapping = ems, c:\
  8240.                                                   ;try EMS, then C: root
  8241.                    Environment = 1024             ;set environment size
  8242.  
  8243.               Here's something a little fancier that changes a number of the
  8244.               default settings:
  8245.  
  8246.                    Swapping = xms, h:\, c:\
  8247.                                                   ;try XMS, then RAM disk,
  8248.                                                   ;  then C: root
  8249.  
  8250.  
  8251.           ___________________________________________________________________
  8252.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  137
  8253.  
  8254.                                                CHAPTER 6 / OPTIONS AND TUNING
  8255.           ___________________________________________________________________
  8256.  
  8257.  
  8258.                    Environment = 1792             ;set env size
  8259.                    Alias = 6144                   ;set alias size
  8260.                    History = 1024                 ;set history size
  8261.                    UmbEnv=Y                       ;master environment in UMB
  8262.                    BatchEcho = No                 ;default is ECHO OFF
  8263.                    EditMode = Insert              ;editor in insert mode
  8264.                    CursorO = 100                  ;overstrike cursor 100%
  8265.                    CursorI = 10                   ;insert cursor 10%
  8266.  
  8267.               The final example is similar to the second, but includes key
  8268.               reassignments and a [Secondary] section to vary a couple of
  8269.               settings in secondary shells:
  8270.  
  8271.                    ; ALL SHELLS
  8272.                    PauseOnError = No              ;don't stop on an error
  8273.                    Swapping = xms, c:\
  8274.                                                   ;try XMS, then C: root
  8275.                    Environment = 1792             ;set env size
  8276.                    Alias = 6144                   ;set alias size
  8277.                    History = 1024                 ;set history size
  8278.                    UmbEnv=Y                       ;master environment in UMB
  8279.                    BatchEcho = No                 ;default is ECHO OFF
  8280.                    EditMode = Insert              ;editor in insert mode
  8281.                    CursorO = 100                  ;overstrike cursor 100%
  8282.                    ListFind = F5                  ;set LIST find to F5
  8283.                    ListNext = F6                  ;find next is F6
  8284.                    ListPrint = F7                 ;print file is F7
  8285.                    ;     PRIMARY SHELL ONLY
  8286.                    [Primary]                      ;set primaries
  8287.                    CursorI = 10                   ;insert cursor 10%
  8288.                    StdColors = bri whi on blu     ;set primary's colors
  8289.                    ;     SECONDARY SHELL ONLY
  8290.                    [Secondary]                    ;set secondaries
  8291.                    CursorI = 30                   ;insert cursor 30%
  8292.                    StdColors = bri whi on cya     ;set secondary's colors
  8293.  
  8294.  
  8295.  
  8296.  
  8297.  
  8298.  
  8299.  
  8300.  
  8301.  
  8302.  
  8303.  
  8304.  
  8305.  
  8306.  
  8307.  
  8308.           ___________________________________________________________________
  8309.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  138
  8310.  
  8311.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8312.           ___________________________________________________________________
  8313.  
  8314.  
  8315.  
  8316.           CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8317.  
  8318.  
  8319.           This section of the manual explains how to get the most from 4DOS
  8320.           with your particular system.  A few general techniques and concepts
  8321.           are explained here, but if you have questions about how to make
  8322.           4DOS run most efficiently with a particular hardware setup or a
  8323.           specific application, you should also see the file called
  8324.           APPNOTES.DOC which comes with 4DOS.
  8325.  
  8326.           If you have questions about some of the terms and concepts here,
  8327.           see Chapter 4 / General Concepts on page 41, the Glossary on page
  8328.           342, and the Index.
  8329.  
  8330.           This section begins with a discussion of hardware considerations
  8331.           and includes some tips for installing 4DOS most effectively to run
  8332.           with several types of software, as well as certain popular
  8333.           programs.  It concludes with some techniques for resolving
  8334.           unintended interactions between programs, even if those
  8335.           interactions do not include 4DOS itself.
  8336.  
  8337.  
  8338.           Hardware
  8339.  
  8340.  
  8341.               The CPU
  8342.  
  8343.               The CPU or "Central Processing Unit" is the chip which
  8344.               performs or directs all of the work done by your computer.
  8345.               All PC CPU chips are part of or compatible with Intel's
  8346.               "80x86" family.  These include the 8088, 8086, 80188, 80186,
  8347.               80286, 386, 486, NEC V20, and NEC V30, plus "SX" versions and
  8348.               other variations of some of those chips.  4DOS is compatible
  8349.               with and will run equally well on all of these chips.
  8350.  
  8351.               Some systems have a numeric coprocessor as a companion to the
  8352.               CPU.  The numeric coprocessor performs many arithmetic
  8353.               calculations faster than the CPU.  4DOS does not use or access
  8354.               the numeric coprocessor in any way.
  8355.  
  8356.               You can determine which CPU chip your system has by using
  8357.               4DOS's _CPU internal variable:
  8358.  
  8359.                    c:\> echo %_cpu
  8360.  
  8361.               Similarly, you can find out if you have a numeric coprocessor
  8362.               with _NDP:
  8363.  
  8364.  
  8365.           ___________________________________________________________________
  8366.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  139
  8367.  
  8368.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8369.           ___________________________________________________________________
  8370.  
  8371.  
  8372.                    c:\> echo %_ndp
  8373.  
  8374.               See page 82 for details about _CPU and _NDP.
  8375.  
  8376.  
  8377.               Memory
  8378.  
  8379.               4DOS does its best to detect and properly access all types of
  8380.               memory that your computer can have:  Base memory, Expanded
  8381.               (EMS) Memory, Extended (XMS) Memory, and Upper Memory Blocks
  8382.               (UMBs).  4DOS always uses standard, documented methods to use
  8383.               the memory that you have installed.
  8384.  
  8385.               4DOS uses base memory (the area from 0 to 640K on most
  8386.               machines, which is sometimes called "low memory" or "DOS
  8387.               memory") for its resident portion and the master environment,
  8388.               and to hold its transient portion while your system is at the
  8389.               command prompt or executing a 4DOS command or batch file.
  8390.               4DOS may use EMS memory or an XMS Extended Memory Block (EMB)
  8391.               to swap its transient portion, according to the Swapping
  8392.               directive in your 4DOS.INI file (see page 125).
  8393.  
  8394.               4DOS uses UMBs for several purposes:
  8395.  
  8396.                    *  to move the 4DOS resident portion out of base memory,
  8397.                       if you specify "UMBLoad = Yes" in your 4DOS.INI file.
  8398.  
  8399.                    *  to move the master environment out of base memory, if
  8400.                       you specify "UMBEnvironment = Yes" in your 4DOS.INI
  8401.                       file.
  8402.  
  8403.                    *  to load memory-resident programs (TSRs) "high" using
  8404.                       the LOADHIGH or LH command under MS-DOS 5.0.
  8405.  
  8406.               To load 4DOS or the master environment into a UMB, you must be
  8407.               using a memory manager or XMS driver which provides both the
  8408.               ability to remap memory into the area between 640K and 1MB (to
  8409.               create the UMBs) and XMS or DOS 5.0 UMB support (to manage the
  8410.               UMBs).  These are generally the same requirements which must
  8411.               be met to load TSRs "high."
  8412.  
  8413.               To give 4DOS access to UMBs, you need hardware and software
  8414.               combinations like the following:
  8415.  
  8416.  
  8417.  
  8418.  
  8419.  
  8420.  
  8421.  
  8422.           ___________________________________________________________________
  8423.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  140
  8424.  
  8425.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8426.           ___________________________________________________________________
  8427.  
  8428.  
  8429.               386 and 486 systems (including 386SX computers):
  8430.  
  8431.                    Hardware:  Sufficient installed RAM.
  8432.  
  8433.                    Software:  Qualitas' 386MAX or Blue Max, Quarterdeck's
  8434.                    QEMM 5.0 or later, DOS 5.0's EMM386.SYS, or a similar 386
  8435.                    memory manager.  HIMEM.SYS alone is not sufficient.
  8436.  
  8437.               80286 systems:
  8438.  
  8439.                    Hardware:  Chips and Technologies NEAT chip set, or an
  8440.                    EMS 4.0 or EEMS memory board, plus sufficient installed
  8441.                    RAM.
  8442.  
  8443.                    Software:  Qualitas' MOVE-EM 1.02 or later with
  8444.                    Microsoft's HIMEM.SYS, or Quarterdeck's QRAM and QEXT.
  8445.  
  8446.               Other memory-management software may also work.  The lists
  8447.               above are examples only.  On the 386 systems here at JP
  8448.               Software, we use 386MAX almost exclusively, but we also have
  8449.               had good results with QEMM.  Look for specific information
  8450.               about your memory management program in APPNOTES.DOC.
  8451.  
  8452.               If you want to use the 4DOS LOADHIGH command as well as put
  8453.               4DOS and the master environment in high memory, you must also
  8454.               be running MS-DOS 5.0 or above.
  8455.  
  8456.               4DOS never accesses extended memory directly.  It always uses
  8457.               an XMS driver like HIMEM.SYS, EMM386.SYS, 386MAX, QEXT, or
  8458.               QEMM.  4DOS can also access any RAM disk you create in
  8459.               extended memory by using a program like VDISK.SYS or
  8460.               RAMDRIVE.SYS.  4DOS does not use the XMS "High Memory Area"
  8461.               (HMA), a 64K byte area just above 1 MB on 80286, 386, and 486
  8462.               systems.
  8463.  
  8464.               If you want to know whether 4DOS sees your system's memory
  8465.               accurately, check the output of the MEMORY command.  It should
  8466.               correspond to your computer's memory configuration.
  8467.  
  8468.               The MEMORY command's output depends to some extent on your
  8469.               memory manager.  If you are using Quarterdeck's QEMM, the
  8470.               report may not be the same as you expect.  Because QEMM turns
  8471.               your extended memory into either XMS or EMS memory as
  8472.               required, the same memory is shown both ways in the MEMORY
  8473.               report.  If 1 MB of extended memory managed by QEMM is
  8474.               available, MEMORY will report 1 MB of free XMS memory and 1 MB
  8475.               of free EMS memory as well, even though it is all the same
  8476.               memory.  This is not a bug but a result of QEMM's flexibility.
  8477.  
  8478.  
  8479.           ___________________________________________________________________
  8480.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  141
  8481.  
  8482.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8483.           ___________________________________________________________________
  8484.  
  8485.  
  8486.               Memory-related problems with 4DOS are usually due to programs
  8487.               which overwrite the extended memory block (EMB) that 4DOS uses
  8488.               for swapping its transient portion.  When you exit from such a
  8489.               program, your system will hang, because 4DOS tried to swap
  8490.               itself back into base memory but its code and data in XMS have
  8491.               been destroyed by the program.  The same problem can occur
  8492.               with EMS swapping but is less common because EMS memory is
  8493.               generally better defended against wayward programs.  You can
  8494.               diagnose this kind of problem easily by changing to disk
  8495.               swapping with the 4DOS.INI Swapping directive, and rebooting.
  8496.               If the problem goes away with disk swapping, then the program
  8497.               in question is probably destroying 4DOS's swap area in XMS or
  8498.               EMS memory.
  8499.  
  8500.               4DOS EMS swapping sometimes has difficulty with EMS drivers
  8501.               which do not fully meet the EMS 3.2 specification (4DOS
  8502.               supports, but does not require, EMS 4.0 drivers).  If you have
  8503.               trouble accessing EMS for swapping, check APPNOTES.DOC to see
  8504.               if there are any known problems with your EMS board or the
  8505.               associated driver software.
  8506.  
  8507.  
  8508.               Video
  8509.  
  8510.               4DOS is compatible with most display adapters and monitors.
  8511.               Although 4DOS can normally detect your video parameters
  8512.               automatically, you may have to configure it to use the system
  8513.               most efficiently.
  8514.  
  8515.               4DOS uses two methods of displaying text on the screen:
  8516.  
  8517.                    *  4DOS calls DOS to write the text of prompts and normal
  8518.                       messages.  If you use an ANSI driver, DOS will transmit
  8519.                       the calls to it.  Otherwise, DOS will use your BIOS to
  8520.                       display text on the screen.  DOS text display calls
  8521.                       will work on all DOS systems, regardless of video type.
  8522.  
  8523.                    *  The DRAWBOX, DRAWHLINE, DRAWVLINE, LIST, SELECT,
  8524.                       SCRPUT, and VSCRPUT commands bypass DOS, the BIOS, and
  8525.                       any ANSI driver.  They write directly to video memory.
  8526.                       These commands will only work on systems with 100% IBM-
  8527.                       compatible video systems.  On other computers, results
  8528.                       will be unpredictable at best.  If you have such a
  8529.                       system you probably know it already, because most
  8530.                       application programs have similar problems.
  8531.  
  8532.               EGA and VGA systems can display text in standard 25-line mode,
  8533.               plus modes with 43, 50, or more lines.  4DOS normally detects
  8534.  
  8535.  
  8536.           ___________________________________________________________________
  8537.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  142
  8538.  
  8539.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8540.           ___________________________________________________________________
  8541.  
  8542.  
  8543.               the number of lines automatically.  If it doesn't, you can use
  8544.               the 4DOS.INI ScreenRows directive or the SETDOS /R command to
  8545.               set the 4DOS screen length.    4DOS uses ScreenRows or SETDOS
  8546.               /R to set the display length that it uses for the LIST and
  8547.               SELECT command, as well as commands that have a "pause" option
  8548.               (TYPE /P, DIR /P, etc.).
  8549.  
  8550.               4DOS never attempts to manipulate your video hardware in order
  8551.               to set the number of rows actually displayed on the screen
  8552.               (the "video mode");  to do so, you must use the software that
  8553.               came with your video board or other software tailored to your
  8554.               system.
  8555.  
  8556.               4DOS does not handle display scrolling at the command prompt.
  8557.               If you put the screen in 43-line or 50-line mode and find that
  8558.               it still scrolls at the 25th line, your ANSI driver is
  8559.               probably not properly supporting your extended screen length.
  8560.               This is not a bug in 4DOS.
  8561.  
  8562.               The video cursor shape that 4DOS uses is defined as a
  8563.               percentage of a character cell height.  You can set the height
  8564.               independently for insert and overstrike mode with the
  8565.               CursorIns and CursorOver directives in 4DOS.INI or with the
  8566.               SETDOS /S command.  If you don't use either, 4DOS sets the
  8567.               height to 10% of the character cell height for overstrike mode
  8568.               and 100% (a block cursor) for insert mode.
  8569.  
  8570.               If you have trouble with the cursor, use SETDOS /S to find the
  8571.               values that work for your system.  Some video boards may not
  8572.               give a "smooth" response to varying SETDOS /S values.  For
  8573.               example, a value of 20% may generate a very small cursor while
  8574.               a value of 30% may generate a half-height cursor.  4DOS can't
  8575.               do anything about this behavior, so you will have to
  8576.               experiment to find the cursor values that you want to use.
  8577.  
  8578.               If the cursor disappears and you can't fix it with SETDOS /S,
  8579.               you probably have a screen color problem.  The cursor is shown
  8580.               in the color of the underlying character cell.  If that cell
  8581.               has (for example) the color attribute of black on black, the
  8582.               cursor will be invisible.  If you are using an ANSI driver,
  8583.               you can fix this problem easily by clearing the screen to a
  8584.               known color with the CLS command.  If the cursor still doesn't
  8585.               reappear, you will have to determine what is setting your
  8586.               screen attributes to an invisible color.  For example, you
  8587.               might be using an ANSI driver that assumes a 25-line video
  8588.               mode on an EGA/VGA system running in 43-line or 50-line mode.
  8589.               This can cause the driver to set portions of the screen to an
  8590.               invisible color when the screen is cleared.
  8591.  
  8592.  
  8593.           ___________________________________________________________________
  8594.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  143
  8595.  
  8596.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8597.           ___________________________________________________________________
  8598.  
  8599.  
  8600.               If you are using an EGA or VGA adapter, we encourage you to
  8601.               try UltraVision from Personics Corp.  It gives you excellent
  8602.               control over your video system, includes a wide variety of
  8603.               text-mode screen fonts, has its own ANSI driver, and works
  8604.               superbly with 4DOS.  We use it and wouldn't be without it.  A
  8605.               special version for laptop and notebook computers dramatically
  8606.               improves the readability of their smaller displays.
  8607.  
  8608.               Most versions of DOS include a copy of ANSI.SYS, a device
  8609.               driver that is normally installed with a DEVICE= line in your
  8610.               CONFIG.SYS file.  There are a number of more powerful and
  8611.               faster versions available as public-domain, shareware, and
  8612.               retail products.  We use PC Magazine's free utility ANSI.COM
  8613.               because it can be enabled, disabled, loaded, and unloaded
  8614.               without rebooting, and because it is small and fast and works
  8615.               well inside windows of multitasking systems.  It is available
  8616.               on most bulletin boards and online systems.  Another excellent
  8617.               choice is ANSI-UV.SYS which is included with UltraVision.
  8618.  
  8619.               4DOS normally detects automatically whether an ANSI driver is
  8620.               installed.  If you have an ANSI driver installed and 4DOS
  8621.               doesn't recognize it, try the command SETDOS /A1 which forces
  8622.               4DOS to use ANSI commands.  Use SETDOS /A2 to tell 4DOS you do
  8623.               not have an ANSI driver installed.  These options can also be
  8624.               set with the ANSI directive in 4DOS.INI.
  8625.  
  8626.  
  8627.               Hard Drives and Floppy Disks
  8628.  
  8629.               4DOS uses your disks for a wide variety of purposes, and many
  8630.               4DOS commands are designed to help you create, move, delete,
  8631.               view, and otherwise manage disk files.  4DOS never tries to
  8632.               manipulate the structure of your hard disk directly.  It never
  8633.               modifies the FAT, root directory, or other system areas of the
  8634.               disk directly, and it doesn't read or write data on your disk
  8635.               itself.  It always calls on DOS to perform these actions, just
  8636.               like most application programs do.  As a result, 4DOS is
  8637.               compatible with all disk sizes, formats, and structures that
  8638.               your DOS version supports.
  8639.  
  8640.               The most common question that we're asked about 4DOS and disks
  8641.               is whether 4DOS will handle a hard disk larger than 32
  8642.               Megabytes.  The answer depends on how your system is
  8643.               configured.  Early versions of DOS do not support hard disks
  8644.               over 32 Megabytes unless a disk partitioning driver like
  8645.               SpeedStor, Vfeature Deluxe, or Disk Manager is used.  Later
  8646.               versions of DOS support large hard disks directly, without a
  8647.               partitioning driver.  If your system supports large hard
  8648.  
  8649.  
  8650.           ___________________________________________________________________
  8651.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  144
  8652.  
  8653.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8654.           ___________________________________________________________________
  8655.  
  8656.  
  8657.               disks, either directly through  DOS or with a partitioning
  8658.               driver, 4DOS will support them also.  If your system doesn't
  8659.               support large hard disks, neither will 4DOS.
  8660.  
  8661.               4DOS will generally access your disk very quickly, but the
  8662.               speed depends on what you are trying to do.  If you find that
  8663.               4DOS is slower at performing a particular function than you
  8664.               are used to, you may have asked it to do more than you ask of
  8665.               traditional DOS commands.  In particular, if you use file
  8666.               descriptions, remember that 4DOS has to access the description
  8667.               file as well as the actual files that you are manipulating.
  8668.  
  8669.               Some users notice that the common commands DEL and DIR appear
  8670.               slower with 4DOS under certain circumstances.  With DEL, this
  8671.               slowdown may be because 4DOS uses a newer method of file
  8672.               deletion instead of an older method that is no longer
  8673.               recommended (but commonly used).  The new method is necessary
  8674.               to enable 4DOS to display the names of the files you are
  8675.               deleting, and to support 4DOS's "extended wildcards" (see page
  8676.               71).  You can force 4DOS to use the older method with DEL's /Q
  8677.               option as long as you don't use extended wildcards.
  8678.  
  8679.               For DIR, any perceived speed decrease is because of 4DOS's
  8680.               directory sorting.  4DOS must read all filenames before it can
  8681.               display any of them.  The sort itself is quite fast, but DOS
  8682.               is relatively slow at retrieving the entire list of file names
  8683.               and passing them on to 4DOS.  Once the 4DOS DIR display
  8684.               starts, it should go as fast as or faster than the traditional
  8685.               DIR display.
  8686.  
  8687.  
  8688.               Laptop and Notebook Computers
  8689.  
  8690.               4DOS makes a great addition to any laptop or notebook
  8691.               computer, but some of these systems have unusual
  8692.               characteristics which you must consider when you install 4DOS
  8693.               or make any change to your CONFIG.SYS file.
  8694.  
  8695.               Many of these computers boot from a floppy drive or a hard
  8696.               disk just like a desktop computer.  On these machines, you can
  8697.               generally install 4DOS just as you would on any other
  8698.               computer.  However, some laptop and notebook computers,
  8699.               including many Tandy laptops, boot from ROM ("Read Only
  8700.               Memory" chips inside the computer).  You need to take some
  8701.               precautions with these machines.
  8702.  
  8703.               First, systems which boot from ROM often can be configured to
  8704.               use either the ROM boot feature or a standard floppy or hard
  8705.  
  8706.  
  8707.           ___________________________________________________________________
  8708.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  145
  8709.  
  8710.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8711.           ___________________________________________________________________
  8712.  
  8713.  
  8714.               drive boot up.  The following comments only apply when you use
  8715.               the ROM boot feature.
  8716.  
  8717.             ! If your system allows you to boot from ROM but load CONFIG.SYS
  8718.               and AUTOEXEC.BAT from a hard disk or floppy, you need to be
  8719.               cautious.  If you make a mistake in a hard-disk based
  8720.               CONFIG.SYS that keeps your system from booting, there may be
  8721.               no way to tell the ROM boot program to ignore the bad
  8722.               CONFIG.SYS file.  You may have to take drastic measures like
  8723.               opening the case and disconnecting the hard drive to get the
  8724.               system to ignore your mistaken CONFIG.SYS and boot properly.
  8725.  
  8726.               If you have a system that boots from ROM and reads CONFIG.SYS
  8727.               from the hard disk, we strongly recommend that you change the
  8728.               configuration to boot from the hard disk or a floppy before
  8729.               you make any change to your CONFIG.SYS file, whether it is
  8730.               related to 4DOS or not.  This will allow you to boot from a
  8731.               boot-up floppy disk if you make an error in the CONFIG.SYS on
  8732.               your hard drive.  Once you are satisfied that everything is
  8733.               working properly, you can switch back to ROM bootup.
  8734.  
  8735.               The second, and related, issue with systems that boot from ROM
  8736.               is that they may consider the ROM to be a disk drive of sorts.
  8737.               A system with drive C as the hard disk may view the ROM as
  8738.               drive D.  When you boot from ROM, the ROM drive is the current
  8739.               drive, and that is where 4DOS will look for the 4START and
  8740.               AUTOEXEC.BAT files.  But they will be on your hard drive or
  8741.               floppy diskette, and 4DOS won't be able to find them.  (This
  8742.               doesn't happen with COMMAND.COM on these systems because the
  8743.               manufacturer has modified it to get around the problem.)
  8744.  
  8745.               If you run into this problem, you can fix it easily with some
  8746.               changes to your CONFIG.SYS and 4DOS.INI files.  First, modify
  8747.               the SHELL= line in CONFIG.SYS so that it tells 4DOS where to
  8748.               find 4DOS.INI.  You can do this by placing the full path to
  8749.               4DOS.INI on the line, like this (see page 111 for more
  8750.               details):
  8751.  
  8752.                    shell=c:\4dos\4dos.com @c:\4dos.ini /p
  8753.  
  8754.               (change the drive and path shown if 4DOS.COM is not in the
  8755.               directory C:\4DOS on your system).  This tells 4DOS to look
  8756.               for 4DOS.INI on drive C, even though the boot drive might be
  8757.               (for example) drive D.  Then add two lines to the 4DOS.INI
  8758.               file (see page 124 for details on these directives):
  8759.  
  8760.                    4StartPath=c:\
  8761.                    AutoExecPath=c:\
  8762.  
  8763.  
  8764.           ___________________________________________________________________
  8765.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  146
  8766.  
  8767.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8768.           ___________________________________________________________________
  8769.  
  8770.  
  8771.               These tell 4DOS to look for 4START and AUTOEXEC.BAT in the
  8772.               root directory of drive C, even though the boot drive may be
  8773.               different.
  8774.  
  8775.               If you have a system like this, 4DOS may set the COMSPEC to
  8776.               the ROM drive.  You can avoid this by setting the COMSPEC
  8777.               yourself on the SHELL= line in CONFIG.SYS (see page 110).  For
  8778.               example, the SHELL= line above could be modified to read:
  8779.  
  8780.                    shell=c:\4dos\4dos.com c:\4dos @c:\4dos.ini /p
  8781.  
  8782.               The second "C:\4DOS" tells 4DOS to use this directory as the
  8783.               COMSPEC path.
  8784.  
  8785.               Finally, if you have a laptop or notebook computer with a
  8786.               color (CGA, EGA, or VGA) video board and a monochrome screen,
  8787.               you may need to use the HELP /M option,  the HelpOptions
  8788.               directive in 4DOS.INI, or run HELPCFG to adjust the HELP
  8789.               colors.
  8790.  
  8791.  
  8792.               Critical Errors
  8793.  
  8794.               A "critical" error is an error that gives you the "Abort,
  8795.               Retry, Fail" message.  With 4DOS running, this message appears
  8796.               as follows:
  8797.  
  8798.                    [Error message]
  8799.                    R(etry), I(gnore), F(ail), or A(bort)?
  8800.  
  8801.               The error message on the first line explains the error that
  8802.               has occurred, and the device on which it occurred.  The second
  8803.               line prompts for your choice of action (the Fail choice will
  8804.               not be displayed under DOS 2).
  8805.  
  8806.               A critical error usually indicates a hardware malfunction.
  8807.               The error may be that the device doesn't exist, there is no
  8808.               disk in the drive, the network has gone down, or a data error
  8809.               occurred.  In most cases you will choose R to retry the
  8810.               operation, or A to abort the operation.
  8811.  
  8812.             ! Choosing I(gnore) can be risky:  it will cause 4DOS to proceed
  8813.               as if the error had not occurred.  This can produce additional
  8814.               errors, and may lead the command which generated the original
  8815.               error to perform its functions improperly.
  8816.  
  8817.               F(ail) will tell 4DOS that the operation it was attempting has
  8818.               failed, which will generally produce another error message.
  8819.  
  8820.  
  8821.           ___________________________________________________________________
  8822.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  147
  8823.  
  8824.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8825.           ___________________________________________________________________
  8826.  
  8827.  
  8828.               For example, if you attempt to do a directory on drive A with
  8829.               no disk in the drive, and answer F to the resulting critical
  8830.               error, you will get an additional error message, "Invalid
  8831.               drive A".
  8832.  
  8833.               Many programs install their own critical error handlers.  If
  8834.               you get a critical error message within an application and the
  8835.               second line does not read as shown above, the message did not
  8836.               come from 4DOS.  Any problem in handling your response
  8837.               properly is due to the application, not to 4DOS.
  8838.  
  8839.               Choosing A(bort) within an application may abort the entire
  8840.               application and not just the operation being performed.  The
  8841.               specific action depends on which critical error handler is in
  8842.               use (4DOS's or the application's), and how the application's
  8843.               critical error handler (if any) is designed.
  8844.  
  8845.               If you are using 4DOS on a system that must run unattended
  8846.               (for example, a bulletin board), you can use the /F startup
  8847.               option in CONFIG.SYS or the CritFail directive in 4DOS.INI
  8848.               (see pages 110 and 135) to provide an automatic F(ail)
  8849.               response to all critical errors.  However, we do not recommend
  8850.               this on a normal system, because you will not have a chance to
  8851.               react to a critical error and correct the problem that caused
  8852.               it.
  8853.  
  8854.  
  8855.           Software
  8856.  
  8857.               You should find that 4DOS is compatible with all your PC
  8858.               software.  We have designed it carefully so that it uses only
  8859.               standard, documented methods to do its job.  It works properly
  8860.               with application software, utilities, networks, multitaskers
  8861.               and task switchers, memory-resident (TSR) programs, and system
  8862.               software like disk caches, memory managers, and device
  8863.               drivers.  We test 4DOS regularly with hundreds of popular
  8864.               software products in order to catch and correct compatibility
  8865.               problems before you encounter them.
  8866.  
  8867.               The following sections discuss using 4DOS with two major kinds
  8868.               of software:  multitasking and task switching programs, and
  8869.               networks.  For specific information about any individual
  8870.               software package, including the latest information about
  8871.               products mentioned here, see the APPNOTES.DOC file distributed
  8872.               with 4DOS.  It contains the latest information we have
  8873.               available when your copy of 4DOS was shipped.
  8874.  
  8875.  
  8876.  
  8877.  
  8878.           ___________________________________________________________________
  8879.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  148
  8880.  
  8881.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8882.           ___________________________________________________________________
  8883.  
  8884.  
  8885.               If you need to diagnose a problem that isn't covered below or
  8886.               in APPNOTES.DOC, see page 7.
  8887.  
  8888.  
  8889.               4DOS and DOS
  8890.  
  8891.               4DOS is compatible with all versions of MS-DOS and PC-DOS from
  8892.               2.0 through 5.0 and above, and with DR-DOS 3.4, 5.0, and
  8893.               above.  For MS-DOS and PC-DOS users, we recommend the use of
  8894.               DOS 3.1 or above.  Some specific considerations for DR-DOS
  8895.               users are discussed in APPNOTES.DOC.  MS-DOS users using the
  8896.               APPEND command may need to set up some aliases to invoke
  8897.               APPEND; see APPNOTES.DOC for details.
  8898.  
  8899.               If you use the FORMAT /S command from MS-DOS or PC-DOS,
  8900.               version 4.0 or above, FORMAT will copy the file pointed to by
  8901.               the COMSPEC environment variable (see page 115) and name it
  8902.               COMMAND.COM.  In most cases this means that 4DOS.COM will be
  8903.               copied to the floppy disk, but with the name COMMAND.COM.
  8904.               Such a disk should boot properly and start 4DOS, but its
  8905.               contents is sure to be confusing to others.  If you use FORMAT
  8906.               /S with MS-DOS or PC-DOS 4.0 or above, we recommend that you
  8907.               copy COMMAND.COM manually to the floppy disk (you can use an
  8908.               alias or batch file if you format bootable disks frequently),
  8909.               or rename the file that FORMAT copies to 4DOS.COM and place a
  8910.               proper CONFIG.SYS file for 4DOS on the floppy disk.
  8911.  
  8912.  
  8913.               Using 4DOS with Task Switchers and Multitaskers
  8914.  
  8915.               Task switchers are programs that allow you to switch quickly
  8916.               among multiple applications, with one application running at a
  8917.               time.  Multitaskers are more complex programs which run
  8918.               multiple applications at the same time, with one or more
  8919.               programs executing "in the background" while you work with
  8920.               another program on the screen.
  8921.  
  8922.               For convenience, in the text below we will refer to both
  8923.               multitaskers and task switchers as "multitaskers," and to each
  8924.               window or partition they use as a "window," even though some
  8925.               do not have windowed displays.
  8926.  
  8927.               4DOS works well as both the primary shell (loaded when your
  8928.               system boots) and the secondary shell (loaded in a window)
  8929.               with most multitaskers.
  8930.  
  8931.               Most multitaskers have a pre-configured "DOS" window.  In some
  8932.               programs, this window always runs COMMAND.COM.  Others run
  8933.  
  8934.  
  8935.           ___________________________________________________________________
  8936.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  149
  8937.  
  8938.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8939.           ___________________________________________________________________
  8940.  
  8941.  
  8942.               whatever program COMSPEC points to, which means they will run
  8943.               4DOS if you boot up with 4DOS.  We recommend that you always
  8944.               set up a 4DOS window explicitly, with the configuration you
  8945.               want, rather that relying on the multitasker's generic "DOS"
  8946.               window.
  8947.  
  8948.               Many multitaskers also run the command processor when you
  8949.               start certain kinds of windows, such as windows that run a
  8950.               .BAT file.  In general, this use of the command processor is
  8951.               transparent.  The multitasker will run 4DOS for you
  8952.               automatically when it needs to, and you won't need to do
  8953.               anything about it.
  8954.  
  8955.               If you find that your multitasker is running COMMAND.COM when
  8956.               you meant to run 4DOS, check the COMSPEC setting that is in
  8957.               effect when you start the multitasker.  You may also need to
  8958.               check the way a particular window is configured.
  8959.  
  8960.               When you set up a 4DOS window, be sure to specify the full
  8961.               path to 4DOS.COM, and any command-line options you want (see
  8962.               page 113 for information on command line options).  To set
  8963.               parameters (swapping, alias space, etc.) to be used by all
  8964.               4DOS secondary shells run by your multitasker, use the
  8965.               [Secondary] section in 4DOS.INI (see page 120).  To set these
  8966.               parameters separately for a specific window, create a copy of
  8967.               4DOS.INI just for that window and use the @d:\path\inifile
  8968.               option on your command line for the window to tell 4DOS where
  8969.               to find 4DOS.INI.  To change the configuration of a specific
  8970.               window without creating a separate copy of 4DOS.INI, use the
  8971.               //iniline option on your command line for the window (see
  8972.               example below).
  8973.  
  8974.               4DOS allows you to place a command to be executed as the last
  8975.               parameter on your 4DOS command line.  This command is executed
  8976.               before 4DOS displays its first prompt.  You can use this
  8977.               feature to run a batch file (or any other command) each time a
  8978.               4DOS window is started by your multitasker.  For example, if
  8979.               you are setting up 4DOS to run as a DOS application under
  8980.               Windows 3.0, your command line might look this:
  8981.  
  8982.                    c:\4dos\4dos.com //swapping=f:\ c:\winstart.btm
  8983.  
  8984.               This tells Windows to load 4DOS, includes a 4DOS.INI directive
  8985.               to tell 4DOS to swap to drive F, and passes 4DOS the command
  8986.               C:\WINSTART.BTM.  You can place commands in C:\WINSTART.BTM to
  8987.               be executed whenever such a window is started (for example, to
  8988.               change your PROMPT to show that you're in a window, or to load
  8989.               a TSR for just that window).  The command to be executed
  8990.  
  8991.  
  8992.           ___________________________________________________________________
  8993.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  150
  8994.  
  8995.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  8996.           ___________________________________________________________________
  8997.  
  8998.  
  8999.               (C:\WINSTART.BTM in this example), must be the last thing on
  9000.               the 4DOS command line;  no 4DOS switches or options can be
  9001.               placed after it because anything after the command will be
  9002.               interpreted as parameters for the command.
  9003.  
  9004.               This command feature is similar to what's provided by the
  9005.               4START batch file, but 4START is executed every time 4DOS
  9006.               loads, whereas a file like WINSTART will be executed only when
  9007.               a 4DOS window is started from your multitasker.  A batch file
  9008.               started this way will be run after 4START.
  9009.  
  9010.               If you use KEYSTACK inside a window of a multitasker, and the
  9011.               KSTACK.COM program has been loaded before the multitasker, you
  9012.               may find that stacked keystrokes "bleed through" from one
  9013.               window to another.  You can solve this problem by loading
  9014.               KSTACK.COM in a startup batch file (see above) for each window
  9015.               where it is needed.  If KSTACK is loaded before the
  9016.               multitasker as well, include a /I on the command line when
  9017.               loading KSTACK inside the window.  If you don't, KSTACK will
  9018.               detect that it is already installed and will not install
  9019.               again.
  9020.  
  9021.  
  9022.               Multitasking and Disk Swapping
  9023.  
  9024.               When 4DOS is loaded as the primary shell, it acts as a
  9025.               "traffic cop" for copies of the transient portion of 4DOS
  9026.               swapped to disk.  Each secondary shell is assigned a unique
  9027.               shell number, which is used as the extension of its disk swap
  9028.               file (4DOSSWAP.001, 4DOSSWAP.002, etc.).  These shell numbers
  9029.               avoid file name conflicts between multiple copies of 4DOS
  9030.               running in different windows but creating swap files in the
  9031.               same disk directory.
  9032.  
  9033.               However, if 4DOS is not loaded before the multitasker, this
  9034.               capability will not be available.  In this case, the copy of
  9035.               4DOS in each window will use a swap file called 4DOSSWAP.000.
  9036.               To avoid a conflict in this situation, you must force every
  9037.               copy of 4DOS to place its swap file in its own unique
  9038.               directory by using the "Swapping=d:\path" directive in
  9039.               4DOS.INI.  If you don't follow this rule, your system will
  9040.               hang when you switch windows or when you exit from an
  9041.               application.
  9042.  
  9043.               This problem will occur only in those rare situations where
  9044.               4DOS is loaded within a window but is not loaded as your
  9045.               primary shell, and if 4DOS disk swapping is used in more than
  9046.               one window at a time.  The problem will not occur if 4DOS is
  9047.  
  9048.  
  9049.           ___________________________________________________________________
  9050.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  151
  9051.  
  9052.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9053.           ___________________________________________________________________
  9054.  
  9055.  
  9056.               loaded as the primary shell (the usual case), or if 4DOS can
  9057.               use EMS or XMS swapping for all simultaneous shells.  Note
  9058.               that since the default swapping option uses disk swapping if
  9059.               insufficient EMS or XMS memory is available, you can be
  9060.               invoking disk swapping in your multitasker's windows without
  9061.               specifically requesting it.
  9062.  
  9063.  
  9064.               4DOS and Microsoft Windows 3.0
  9065.  
  9066.               4DOS works well as both the primary shell, loaded before
  9067.               Windows 3, and as a secondary shell loaded inside any window.
  9068.               It works in any Windows mode (Real, Standard, or Enhanced).
  9069.               The previous general information about multitaskers applies to
  9070.               Windows as well.  You should read it before continuing with
  9071.               this section.
  9072.  
  9073.               To run 4DOS as a secondary shell from within Windows, you will
  9074.               need to create a Program Manager icon to run 4DOS.  The
  9075.               generic "DOS" icon supplied by Microsoft will only run
  9076.               COMMAND.COM.  You can set up a 4DOS icon from the Program
  9077.               Manager's File / New menu selection.
  9078.  
  9079.               First, create a new program item and set the command line to
  9080.               "C:\4DOS\4DOS.COM" (use the appropriate drive and path for
  9081.               your system).  As discussed above, you can put the name of a
  9082.               batch file at the end of the command line.
  9083.  
  9084.               To install a special 4DOS icon, use the Program Manager's File
  9085.               / Properties menu selection.  Click on the Change Icon button
  9086.               and type in the full path name of your new 4DOS icon file.  We
  9087.               supply two Windows icons with 4DOS:  4DOS.ICO for color
  9088.               displays, and 4DOSM.ICO for monochrome displays.  Of course,
  9089.               you can create your own with any icon editor.
  9090.  
  9091.               For more flexibility, you can use the Windows PIF editor to
  9092.               create a 4DOS.PIF file.  We have included a sample .PIF file
  9093.               on the distribution diskette.  You must edit this file and
  9094.               make it correspond to your system before you use it to run
  9095.               4DOS.
  9096.  
  9097.               If you run Windows in 386 Enhanced mode, 4DOS will work
  9098.               properly in either a full-screen or a windowed session.  The
  9099.               .PIF file determines the mode that 4DOS will start in.  If you
  9100.               don't use a .PIF file, 4DOS will always start in full-screen
  9101.               mode.
  9102.  
  9103.  
  9104.  
  9105.  
  9106.           ___________________________________________________________________
  9107.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  152
  9108.  
  9109.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9110.           ___________________________________________________________________
  9111.  
  9112.  
  9113.               Your batch files can determine whether they are running in a
  9114.               secondary shell under Windows, and the current Windows mode,
  9115.               with the 4DOS _WIN environment variable (see page 84).
  9116.  
  9117.               You can easily set up the Windows File Manager so that it will
  9118.               consider .BTM files to be "executable".  Open your WIN.INI
  9119.               file with any editor and find the section labeled
  9120.               "[extensions]".  Add the following line to the end of the
  9121.               section:
  9122.  
  9123.                    btm=c:\4dos\4dos.com /c ^.btm
  9124.  
  9125.               (adjust this to show the proper path for 4DOS.COM on your
  9126.               system).  It is not possible to execute .BTM files from the
  9127.               Program Manager by modifying the Programs= setting in WIN.INI;
  9128.               if you try to do so, the system will hang when you attempt to
  9129.               actually invoke a BTM file.
  9130.  
  9131.  
  9132.               4DOS and DESQView
  9133.  
  9134.               4DOS works well as both the primary shell loaded before
  9135.               DESQView, and as the secondary shell loaded inside any
  9136.               DESQView window.  The previous general information about
  9137.               multitaskers applies to DESQView as well.  You should read it
  9138.               before continuing with this section.
  9139.  
  9140.               To use 4DOS as a secondary shell with DESQview, you must add
  9141.               it to your DESQview "Open Window" menu.  To do this, select
  9142.               the Add a Program option, then press the "O" key (for Other
  9143.               Program).  Press Enter and you will get an Add a Program
  9144.               window.  You'll need to modify settings on the standard first
  9145.               screen, and on the second "advanced options" screen.  Set the
  9146.               Program Name to C:\4DOS\4DOS.COM (adjust the drive and path
  9147.               for your own computer).  Set the Parameters to whatever 4DOS
  9148.               startup options you want, but do not use /C or /P.  For other
  9149.               DESQView parameters, the defaults are workable with the
  9150.               following changes:
  9151.  
  9152.                    To run 4DOS in a full-screen window:
  9153.  
  9154.                          Writes Text Directly to Screen:    Y    (screen 1)
  9155.                          Virtualize Text / Graphics:        N    (screen 1)
  9156.                          Close on Exit to DOS:              Y    (screen 2)
  9157.                          Uses its Own Colors:               Y    (screen 2)
  9158.  
  9159.                    To run 4DOS in a window smaller than the full screen:
  9160.                          Writes Text Directly to Screen:    N    (screen 1)
  9161.  
  9162.  
  9163.           ___________________________________________________________________
  9164.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  153
  9165.  
  9166.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9167.           ___________________________________________________________________
  9168.  
  9169.  
  9170.                          Virtualize Text / Graphics:        Y/T  (screen 1)
  9171.                          Close on Exit to DOS:              Y    (screen 2)
  9172.                          Uses its Own Colors:               Y    (screen 2)
  9173.  
  9174.               4DOS is written to be "DESQView-aware", and will not "bleed
  9175.               through" to other windows when running full-screen commands
  9176.               such as HELP, LIST, or SELECT.
  9177.  
  9178.               If you use 4DOS commands that work with an ANSI driver (CLS,
  9179.               COLOR, and the COLORDIR environment variable), you will need
  9180.               to load the ANSI driver in your 4DOS window.  Drivers like PC
  9181.               Magazine's ANSI.COM may work in full-screen windows, but we've
  9182.               found that the only ANSI driver which works properly in a
  9183.               window smaller than the full screen is Quarterdeck's
  9184.               DVANSI.COM.
  9185.  
  9186.               You can set up a startup batch file to load your ANSI driver
  9187.               or take other actions when a DESQView 4DOS window is opened,
  9188.               as discussed in the general section on multitaskers above.
  9189.               Just place the batch file name (with drive and path if
  9190.               necessary) as the last thing on the Parameters line.
  9191.  
  9192.               DESQView will work properly with the UMBLoad and
  9193.               UMBEnvironment directives set to Yes for the primary shell in
  9194.               4DOS.INI, but may not work properly if these directives are
  9195.               also active in secondary shells.  4DOS will turn these
  9196.               directives off by default when loading a secondary shell under
  9197.               DESQView, but you can override this default action with any
  9198.               directives you explicitly place in 4DOS.INI.  If you have
  9199.               trouble with secondary shells and are using either of these
  9200.               directives, try placing the following lines in the [Secondary]
  9201.               section of 4DOS.INI:
  9202.  
  9203.                    UMBLoad = No
  9204.                    UMBEnvironment = No
  9205.  
  9206.               If you want to use DESQView's DOS Services program, check
  9207.               APPNOTES.DOC for the details on how to set it up for use with
  9208.               4DOS.
  9209.  
  9210.  
  9211.               Using 4DOS on a Network
  9212.  
  9213.               4DOS works well with DOS-compatible networks.  This section
  9214.               will give you some tips on using 4DOS properly on a network,
  9215.               and on the locations to use for 4DOS files on a network.
  9216.  
  9217.  
  9218.  
  9219.  
  9220.           ___________________________________________________________________
  9221.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  154
  9222.  
  9223.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9224.           ___________________________________________________________________
  9225.  
  9226.  
  9227.               In general, you'll find that you can load and run your network
  9228.               software normally under 4DOS.  Network drives will be
  9229.               accessible as normal drives once the network is loaded, and
  9230.               files on the network will be accessible just as if they were
  9231.               on a local hard disk.
  9232.  
  9233.               Some networks support file and directory names beginning with
  9234.               a double backslash, or with a server name followed by a colon,
  9235.               to identify files by their location on the network.  4DOS
  9236.               detects such names and passes them through to the network
  9237.               unaltered, allowing the network software to process them
  9238.               properly.
  9239.  
  9240.               In rare situations, you may have trouble loading network
  9241.               software under 4DOS.  To the best of our knowledge, all DOS-
  9242.               compatible networks do work with 4DOS.  If yours doesn't, our
  9243.               experience suggests that the most common cause is a network
  9244.               bug, an old version of your network software, or a conflict in
  9245.               the way 4DOS and your network are configured.  Most bugs have
  9246.               now been corrected by network vendors, and should not appear
  9247.               on your system.  If you have any questions about compatibility
  9248.               with your particular network, first check for a listing in
  9249.               APPNOTES.DOC; then of course feel free to contact our
  9250.               technical support department for assistance.
  9251.  
  9252.               If you need to boot a diskless workstation from a network
  9253.               drive, you must have the network drive accessible at boot
  9254.               time.  If this condition is satisfied (so 4DOS can find its
  9255.               files on the network drives), the normal approach can be used
  9256.               to start 4DOS from the network.
  9257.  
  9258.               Some networks with large server disk drives (256 MB or more)
  9259.               may report values that are too small if the FREEcommand and
  9260.               the %@DISKFREE, %@DISKTOTAL, and %@DISKUSED variable functions
  9261.               are used for the server drive.  If this occurs, it is because
  9262.               the network software does not provide a way to return larger
  9263.               values to 4DOS.
  9264.  
  9265.             ! When you use 4DOS on a network, pay attention to where files
  9266.               are stored in order to ensure that two 4DOS users do not
  9267.               attempt to access the same 4DOS file at the same time.  You
  9268.               will need to pay particular attention to disk swapping and
  9269.               pipes.
  9270.  
  9271.               If 4DOS uses disk swapping (either because of an explicit
  9272.               directive in 4DOS.INI or because default swapping is used and
  9273.               no EMS or XMS memory is available), you should be sure that
  9274.               two users don't use the same directory simultaneously for
  9275.  
  9276.  
  9277.           ___________________________________________________________________
  9278.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  155
  9279.  
  9280.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9281.           ___________________________________________________________________
  9282.  
  9283.  
  9284.               their disk swap files.  If they do, the filenames
  9285.               (4DOSSWAP.000, 4DOSSWAP.001, etc.) will conflict and each user
  9286.               will write over the other's files, possibly causing one or
  9287.               both systems to hang.  To take care of this, use the Swapping
  9288.               directive in 4DOS.INI to assign each user's swap files to a
  9289.               different directory on the network drive.
  9290.  
  9291.               Pipes are a method of passing information from one program to
  9292.               another, and are invoked with the pipe symbol [|] on the
  9293.               command line (see page 65).  Pipes work by taking the output
  9294.               from one program, storing it in a temporary file, then telling
  9295.               a second program to obtain its input from that file.  The
  9296.               temporary files, with names like P1.$00 and P2.$00, are placed
  9297.               by default in the root directory of the boot drive, but can be
  9298.               placed on a different drive and directory by setting the TEMP
  9299.               or TEMP4DOS environment variable (see page 115).
  9300.  
  9301.               The same cautions given for disk swapping must be followed for
  9302.               pipe temporary files; that is, you must ensure that each
  9303.               user's temporary pipe files go to a separate directory.  To do
  9304.               this, just be sure that each network user running 4DOS has
  9305.               TEMP or TEMP4DOS set to a unique directory.  If you boot 4DOS
  9306.               from a local hard disk, the pipe temporary files will go to
  9307.               that disk and the environment variable setting will not be
  9308.               necessary.
  9309.  
  9310.  
  9311.           Solving Software Compatibility Problems
  9312.  
  9313.               Any DOS program running on your computer can potentially
  9314.               interact with any other program running at the same time.  Of
  9315.               course, most program interactions are ones you want: your
  9316.               print spooler intercepts printer output and saves it to print
  9317.               later, or your disk cache intercepts disk requests and speeds
  9318.               them up by retrieving data from memory.
  9319.  
  9320.               If you've used the PC for any length of time, however, you'll
  9321.               know that you can also get interactions you don't want.  If
  9322.               you load just the wrong combination of TSRs and device
  9323.               drivers, your system may slow to a crawl.  Perhaps you can't
  9324.               load your favorite Personal Information Manager with Windows
  9325.               running.  And so on.
  9326.  
  9327.               As publishers of a product that replaces part of the operating
  9328.               system, we're very familiar with these issues -- not because
  9329.               4DOS is more likely to cause problems, but because it
  9330.               sometimes gets blamed first when a problem appears.  Our
  9331.               technical support department has developed a set of reliable
  9332.  
  9333.  
  9334.           ___________________________________________________________________
  9335.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  156
  9336.  
  9337.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9338.           ___________________________________________________________________
  9339.  
  9340.  
  9341.               techniques for finding out what's causing an apparent
  9342.               compatibility problem with 4DOS and other software.
  9343.  
  9344.               We are presenting these techniques here as a series of things
  9345.               to try when there seems to be a compatibility problem.  Some
  9346.               may not make sense for the particular problem you're
  9347.               investigating.  Others may not yield useful results.  But as a
  9348.               group, they'll help you resolve many of the common software
  9349.               interactions that do appear, whether with 4DOS or anything
  9350.               else.
  9351.  
  9352.               Some of our suggestions help you figure out what's going on,
  9353.               but aren't intended to help you fix it.  For example, when we
  9354.               suggest that you remove all your TSRs to look for the problem,
  9355.               we aren't suggesting that as a permanent solution, but only as
  9356.               a diagnostic test.  Before you get started, be sure to check
  9357.               APPNOTES.DOC to see if we've already solved the problem you're
  9358.               facing.
  9359.  
  9360.               The first thing to consider is whether the particular
  9361.               combination of software that's not working used to work
  9362.               together.  If so, think carefully about what you have changed
  9363.               and see if reversing the change solves the problem.  If it
  9364.               does, then you can narrow your search, using the following
  9365.               techniques to find out what it is about that specific change
  9366.               that is causing the problem.
  9367.  
  9368.               Second, make sure that your problem can be reproduced
  9369.               relatively easily, and make sure you know exactly what
  9370.               sequence of commands or other steps reproduces it.  Most
  9371.               interactions are very easy to reproduce, but if you think
  9372.               there's an interaction and it occurs once every 10 days, it's
  9373.               going to be difficult to know when you have fixed it.  Also,
  9374.               the process of carefully documenting how to reproduce a
  9375.               problem often helps you realize what the problem is without
  9376.               further effort.
  9377.  
  9378.               Third, if you have a problem with a specific application
  9379.               hanging or working improperly, try cleaning up the
  9380.               "atmosphere" in which that program runs.  This is the single
  9381.               most useful tool we know for finding compatibility problems.
  9382.               By "cleaning up the atmosphere" we mean all of the following,
  9383.               and any other similar things you may be able to think of about
  9384.               your particular system after reading our suggestions below:
  9385.  
  9386.                    Check the length of your PATH variable.  4DOS lets you
  9387.                    make it longer than the standard limit of 123 characters.
  9388.                    Some programs can't handle long PATHs and may behave
  9389.  
  9390.  
  9391.           ___________________________________________________________________
  9392.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  157
  9393.  
  9394.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9395.           ___________________________________________________________________
  9396.  
  9397.  
  9398.                    strangely.  If your PATH is over the normal limit, reduce
  9399.                    its size using the PATH or ESET command and see if the
  9400.                    application starts working.  If so, use a batch file or
  9401.                    alias to set up an alternate path for running that one
  9402.                    program, for example:
  9403.  
  9404.                         setlocal
  9405.                         path d:\myprog
  9406.                         d:\myprog\myprog.exe
  9407.                         endlocal
  9408.  
  9409.                    The SETLOCAL / ENDLOCAL pair saves and restores the
  9410.                    environment;  when you're done, the old PATH will be
  9411.                    restored automatically (see page 298).
  9412.  
  9413.                    Next, check how much environment space is in use in your
  9414.                    system.  The 4DOS MEMORY command reports the total
  9415.                    environment space and the amount free; a simple
  9416.                    subtraction tells you how much is in use.  Some programs
  9417.                    use outdated techniques and simply don't work right if
  9418.                    there's a lot of information in the environment (these
  9419.                    programs don't usually care how big the total environment
  9420.                    space is, only how much of it is actually in use).  In
  9421.                    most cases, these problems show up when the amount of
  9422.                    space in use gets up to around 1K (1024) bytes or so, but
  9423.                    they can occur at any point. To test for this, use the
  9424.                    following simple batch file:
  9425.  
  9426.                         setlocal
  9427.                         unset var1 var2 var3 ...
  9428.                         [command to run the program in question]
  9429.                         endlocal
  9430.  
  9431.                    where VAR1, VAR2, etc. are variables you can remove from
  9432.                    the environment to decrease the space in use before
  9433.                    running the program.  If reducing the environment space
  9434.                    in use makes things work, contact the program's
  9435.                    manufacturer and report the problem.  You have found a
  9436.                    legitimate bug.  DOS allows an environment of up to 32K
  9437.                    and all programs should be able to work with an
  9438.                    environment that large.  Until the manufacturer fixes the
  9439.                    bug, use the batch file above as a workaround.
  9440.  
  9441.                    Next, look for a multi-program interaction.  Remove all
  9442.                    the device drivers and TSRs you possibly can and still
  9443.                    have enough software present to demonstrate the problem.
  9444.                    For example, you can't look for a network problem if you
  9445.                    don't load the network, but you probably can check it
  9446.  
  9447.  
  9448.           ___________________________________________________________________
  9449.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  158
  9450.  
  9451.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9452.           ___________________________________________________________________
  9453.  
  9454.  
  9455.                    without your disk cache running.  When you do this, and
  9456.                    any time you modify your boot configuration, be sure you
  9457.                    have a bootable floppy disk handy.
  9458.  
  9459.                    If you run a partitioning disk driver like SpeedStor,
  9460.                    Vfeature, or Disk Manager, you probably can't remove it
  9461.                    for diagnostic purposes without temporarily losing access
  9462.                    to some or all of your hard disk.  The same may be true
  9463.                    of disk compression programs like Stacker, depending on
  9464.                    the mode in which they are installed.  Most other device
  9465.                    drivers and TSRs can be removed without causing trouble.
  9466.                    Check your system and software manuals if you are unsure
  9467.                    of which programs can safely be removed.
  9468.  
  9469.                    Once you know what you can take out, don't skimp or guess
  9470.                    where the interaction might be.  Take out everything you
  9471.                    possibly can from CONFIG.SYS, 4START, and AUTOEXEC.BAT
  9472.                    that loads or accesses another program .  In CONFIG.SYS,
  9473.                    remove all possible DEVICE and INSTALL statements.  In
  9474.                    AUTOEXEC.BAT, remove all the lines you can that load
  9475.                    memory-resident programs (and remember that some DOS
  9476.                    utilities, like MODE, can be memory-resident).  Of
  9477.                    course, save copies of your configuration files before
  9478.                    you delete anything.  Better yet, use the REM command to
  9479.                    remove lines temporarily without deleting them.  REM can
  9480.                    be used on any line in AUTOEXEC.BAT, in 4START, and in
  9481.                    CONFIG.SYS if you are running DOS 4.0 or above.  In
  9482.                    earlier versions, REM will work in CONFIG.SYS but will
  9483.                    also generate a harmless "unrecognized command" error
  9484.                    message during bootup.  If you want to remove everything
  9485.                    in AUTOEXEC.BAT you can simply rename it to any other
  9486.                    name, and rename it back when you are done testing.
  9487.  
  9488.                    Clean out your configuration files all at once, not one
  9489.                    line at a time.  If that solves the problem, you're on
  9490.                    the right track, and you can put the lines back one at a
  9491.                    time until you find the culprit.  If it doesn't solve the
  9492.                    problem, you won't waste time removing lines one by one.
  9493.  
  9494.                    If you do find a suspect program, first try booting your
  9495.                    system with COMMAND.COM, without changing anything else
  9496.                    about your configuration.  If the problem remains, then
  9497.                    it's not related to an interaction with 4DOS.
  9498.  
  9499.                    If the problem isn't there under COMMAND.COM, try
  9500.                    fiddling with the program's configuration. If you were
  9501.                    loading it high, try loading it low.  If you can change
  9502.                    the way it uses memory, try doing so.  If it's a driver
  9503.  
  9504.  
  9505.           ___________________________________________________________________
  9506.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  159
  9507.  
  9508.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9509.           ___________________________________________________________________
  9510.  
  9511.  
  9512.                    that's used by other programs (like your mouse driver)
  9513.                    and is quite old, consider obtaining an update from the
  9514.                    manufacturer. All of these techniques will help you
  9515.                    narrow down what it is about the program that's causing a
  9516.                    problem.  Once you have done that, you may have a simple
  9517.                    workaround.  If not, contact our technical support crew
  9518.                    and we'll try to verify the problem, then resolve it with
  9519.                    the manufacturer of the other software.
  9520.  
  9521.                    Rarely, some problems can be resolved by modifying the
  9522.                    order in which you load drivers and TSRs.  If you've
  9523.                    found a problem with a particular driver or TSR, try
  9524.                    loading it earlier or later than you were and see if the
  9525.                    problem goes away.
  9526.  
  9527.               Next, try modifying the atmosphere in another way:  change the
  9528.               way 4DOS is configured.  In particular, try changing the 4DOS
  9529.               swapping type using the Swapping directive in 4DOS.INI (see
  9530.               page 125).  This technique is especially appropriate if the
  9531.               system hangs every time you exit a particular application.  If
  9532.               that solves the problem, there's probably a memory conflict.
  9533.               Another program is trying to use the same memory space 4DOS
  9534.               uses for swapping.  See if you can control the other program's
  9535.               memory usage.
  9536.  
  9537.               If you can configure 4DOS and the other program to work
  9538.               together, you're all set.  If they work together only in a
  9539.               useless combination (for example, with 4DOS swapping turned
  9540.               off), contact us.  We'll try to figure out what the other
  9541.               program is doing to damage 4DOS's swap space and get the
  9542.               manufacturer to take care of the problem.
  9543.  
  9544.               You can also change the UMB-related configuration settings
  9545.               (UMBLoad and UMBEnvironment) to help diagnose compatibility
  9546.               problems.  Problems with these directives are rare, but if
  9547.               you're at an impasse, try setting both of these values to "No"
  9548.               in 4DOS.INI.
  9549.  
  9550.               Some of the advanced directives in 4DOS.INI (see page 135) may
  9551.               help solve very rare configuration problems, but unless you
  9552.               are an experienced DOS user and understand the side effects of
  9553.               each directive, they should be used only as diagnostic tools,
  9554.               and not as a workaround or fix. Any of the following can be
  9555.               tried:
  9556.  
  9557.                    Inherit = No
  9558.                    LineInput = Yes      (or SETDOS /L1)
  9559.                    Reduce = No
  9560.  
  9561.  
  9562.           ___________________________________________________________________
  9563.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  160
  9564.  
  9565.                        CHAPTER 7 / USING 4DOS WITH YOUR HARDWARE AND SOFTWARE
  9566.           ___________________________________________________________________
  9567.  
  9568.  
  9569.                    StackSize = nnnn     (increase value to 4096 or more)
  9570.  
  9571.               If you've tried all these techniques and haven't found the
  9572.               problem, contact our technical support department (see page
  9573.               7).  We have more tricks up our sleeve, and a very high
  9574.               success rate at resolving software interactions.
  9575.  
  9576.  
  9577.  
  9578.  
  9579.  
  9580.  
  9581.  
  9582.  
  9583.  
  9584.  
  9585.  
  9586.  
  9587.  
  9588.  
  9589.  
  9590.  
  9591.  
  9592.  
  9593.  
  9594.  
  9595.  
  9596.  
  9597.  
  9598.  
  9599.  
  9600.  
  9601.  
  9602.  
  9603.  
  9604.  
  9605.  
  9606.  
  9607.  
  9608.  
  9609.  
  9610.  
  9611.  
  9612.  
  9613.  
  9614.  
  9615.  
  9616.  
  9617.  
  9618.  
  9619.           ___________________________________________________________________
  9620.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  161
  9621.  
  9622.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  9623.           ___________________________________________________________________
  9624.  
  9625.  
  9626.  
  9627.           CHAPTER 8 / COMMAND REFERENCE GUIDE
  9628.  
  9629.  
  9630.           The following pages are a complete guide and reference to the 4DOS
  9631.           commands that are available from the command line, in aliases, and
  9632.           in batch files.  Nearly all of these commands are internal 4DOS
  9633.           commands, which means that 4DOS performs the activity you have
  9634.           requested without running another program.  External commands
  9635.           require loading and running a separate program, either an
  9636.           executable (.EXE or .COM) program or a batch (.BTM or .BAT)
  9637.           program.  DOS is shipped with a number of external utility programs
  9638.           (such as FORMAT and DISKCOPY), and any program or application you
  9639.           install on your system becomes a new external command.
  9640.  
  9641.           The advantage of internal commands is that they run almost
  9642.           instantly.  When you give 4DOS an internal command, it interprets
  9643.           the command line and carries out the necessary activities without
  9644.           having to look for, load, and run another program.
  9645.  
  9646.           The advantage of external commands is that they can be large,
  9647.           varied, and complex without taking space inside the system command
  9648.           processor.  External commands can also be renamed or replaced
  9649.           easily.  If you want to rename the external DOS command XCOPY to
  9650.           MYCOPY, for example, all you need to do is find the file called
  9651.           XCOPY.EXE on your DOS disk or directory and change its name to
  9652.           MYCOPY.EXE.  If you want to replace XCOPY with a more efficient
  9653.           program, you can do so.  4DOS adds this flexibility to internal
  9654.           commands.  You can rename or replace any internal command by using
  9655.           an ALIAS, and you can enable or disable internal commands whenever
  9656.           you wish.
  9657.  
  9658.  
  9659.           4DOS Commands
  9660.  
  9661.               4DOS has over 80 internal commands, many more than any version
  9662.               of DOS.  4DOS neither replaces nor interferes with external
  9663.               DOS commands like ASSIGN, BACKUP, CHKDSK, DISKCOPY, SUBST, or
  9664.               XCOPY.  Once 4DOS is installed, you can continue to use those
  9665.               utilities like you always have.  Also, 4DOS has been designed
  9666.               so that it is compatible with virtually all traditional
  9667.               internal commands, even though it enhances many of those
  9668.               commands with additional options and capabilities.  Once you
  9669.               have installed 4DOS, you can continue using the commands that
  9670.               you already know and get the same results.
  9671.  
  9672.               A few of the 4DOS commands are the same as traditional
  9673.               commands, some are enhanced with new features, and many are
  9674.  
  9675.  
  9676.           ___________________________________________________________________
  9677.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  162
  9678.  
  9679.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  9680.           ___________________________________________________________________
  9681.  
  9682.  
  9683.               unique to 4DOS.  The best way to learn the 4DOS commands is to
  9684.               use them and experiment with them.  The following lists
  9685.               categorize the available commands by topic and will help you
  9686.               find the ones that you need.  Most of this chapter is an
  9687.               alphabetic list of the commands and how to use each one.  We
  9688.               urge you to browse through this chapter occasionally and look
  9689.               for commands that might help simplify your computing life.
  9690.  
  9691.               In the following summary lists, commands that are unique to
  9692.               4DOS are marked with a  number sign [#].  Those which are
  9693.               enhanced traditional commands are marked with an asterisk [*].
  9694.               And those which are identical to traditional commands have no
  9695.               marks at all.
  9696.  
  9697.               System Configuration Commands:
  9698.  
  9699.                  BREAK          CHCP           CTTY           DATE
  9700.                  FREE #         LH / LOADHIGH  MEMORY #       PROMPT *
  9701.                  REBOOT #       SETDOS #       SWAPPING #     TIME
  9702.                  VER            VERIFY         VOL *
  9703.  
  9704.               File and directory management:
  9705.                  ATTRIB *       COPY *         DEL / ERASE *  DESCRIBE #
  9706.                  MOVE #         REN / RENAME * TRUENAME #
  9707.  
  9708.               Subdirectory management:
  9709.  
  9710.                  CD / CHDIR *   CDD #          DIR *          DIRS #
  9711.                  MD / MKDIR *   POPD #         PUSHD #        RD / RMDIR *
  9712.  
  9713.               Commands normally used in batch files and aliases (many are
  9714.               also useful at the command line):
  9715.                  ALIAS #        BEEP #         CALL           CANCEL #
  9716.                  COLOR #        DELAY #        DRAWBOX #      DRAWHLINE #
  9717.                  DRAWVLINE #    ECHO *         ECHOS #        ENDLOCAL #
  9718.                  GOSUB #        GOTO *         FOR *          IF *
  9719.                  IFF #          INKEY #        INPUT #        KEYSTACK #
  9720.                  LOADBTM #      PAUSE *        QUIT #         REM *
  9721.                  RETURN #       SCREEN #       SCRPUT #       SETLOCAL #
  9722.                  SHIFT *        TEXT #         TIMER #        UNALIAS #
  9723.                  VSCRPUT #
  9724.  
  9725.               Other commands:
  9726.  
  9727.                  ? #            CLS *          ESET #         EXCEPT #
  9728.                  EXIT *         GLOBAL #       HELP #         HISTORY #
  9729.                  LIST #         LOG #          PATH *         SELECT #
  9730.                  SET *          TEE #          TYPE *         UNSET #
  9731.  
  9732.  
  9733.           ___________________________________________________________________
  9734.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  163
  9735.  
  9736.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  9737.           ___________________________________________________________________
  9738.  
  9739.  
  9740.                  Y #
  9741.  
  9742.               As you can see, most 4DOS commands are either enhanced
  9743.               traditional commands or are entirely new.  If you are
  9744.               comfortable using traditional commands, you can switch to 4DOS
  9745.               without making any changes in your habits.  But you will be
  9746.               missing a lot of the power of 4DOS's enhancements and new
  9747.               commands unless you take a few minutes to see what's available
  9748.               here.  Make sure you don't skip a section of this reference
  9749.               just because you already know how to use a traditional command
  9750.               with the same name.
  9751.  
  9752.               We have made no attempt to document external DOS commands in
  9753.               this reference, partly because they are explained in your DOS
  9754.               manual, and partly because the number and name of DOS external
  9755.               commands, and the options available with each command, vary
  9756.               widely from one version of DOS to another and from one
  9757.               computer manufacturer to another.  The 4DOS HELP system does
  9758.               include information on standard DOS external commands.
  9759.  
  9760.               If you come across terms or concepts in this chapter that you
  9761.               are unsure about, please refer to Chapter 4 / General
  9762.               Concepts, the Glossary on page 342, or the Index.
  9763.  
  9764.  
  9765.           How to Use the Command Descriptions
  9766.  
  9767.               Each of the 4DOS commands is described in detail on the
  9768.               following pages.  The descriptions are arranged
  9769.               alphabetically, and each includes examples that will help you
  9770.               learn to use the commands.
  9771.  
  9772.               Each description begins with the name of the command on the
  9773.               left side of the page and a word in parentheses on the right
  9774.               side.  The commands marked "New" are unique to 4DOS.  Those
  9775.               marked "Enhanced" are similar to traditional commands but add
  9776.               new features and options.  The commands marked "Compatible"
  9777.               follow the syntax and features of the traditional command with
  9778.               the same name.
  9779.  
  9780.               The name is followed by a sentence or two that briefly
  9781.               describes the command's purpose or major function.  That
  9782.               sentence should help you determine quickly whether you have
  9783.               found the command you are seeking.
  9784.  
  9785.               The next part of each description shows the command's format
  9786.               or syntax.  The format line uses certain conventions to
  9787.  
  9788.  
  9789.  
  9790.           ___________________________________________________________________
  9791.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  164
  9792.  
  9793.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  9794.           ___________________________________________________________________
  9795.  
  9796.  
  9797.               describe how the command should be entered and to create
  9798.               reference points for the text describing the command:
  9799.  
  9800.                    Words in UPPER CASE must be spelled exactly as they are
  9801.                    shown (although you can type them in using either upper
  9802.                    or lower case, or a combination).  If a word is shown
  9803.                    partly in upper case (for example BLInk), only the upper
  9804.                    case portion is required, the rest is optional.
  9805.  
  9806.                    Words shown in italics (for example source or filename)
  9807.                    are meant to be replaced by other words or values.  Each
  9808.                    of these words is explained directly beneath the format
  9809.                    line, and discussed in more detail in the text
  9810.                    description of the command.  When the word stands for a
  9811.                    file name, the name may be a simple file name like
  9812.                    MYFILE.TXT or it may include a drive letter and/or a full
  9813.                    path, like C:\MYDIR1\MYDIR2\MYFILE.TXT.  If the command
  9814.                    can work on multiple files, you can use the 4DOS
  9815.                    wildcards, multiple file names, or an include list (see
  9816.                    pages 71, 73, and 74).
  9817.  
  9818.                    Anything followed by an ellipsis (three periods [...])
  9819.                    may be repeated as often as you wish.
  9820.  
  9821.                    Text shown in [square brackets] is optional.  Text
  9822.                    outside of square brackets must be entered literally (if
  9823.                    it is capitalized) or replaced by other words or values
  9824.                    (if it is in italics).
  9825.  
  9826.                    Vertical bars | represent a choice;  you can pick one
  9827.                    option or another but not both.  For example, the
  9828.                    following format shows that the command may be followed
  9829.                    by the word ON or the word OFF, but not both:
  9830.  
  9831.                         COMMAND [ ON | OFF ]
  9832.  
  9833.                    A slash followed by a letter, like [/X], is an "option"
  9834.                    or "switch" which controls the effect of a command.  Many
  9835.                    commands have several switches, and you are usually free
  9836.                    to use none, one, or several to make a command behave as
  9837.                    you wish.  If you use a single switch, you must precede
  9838.                    it with a slash.  If you use several switches, in most
  9839.                    cases you can put them together with one slash or use
  9840.                    separate slashes.  For example, if you wanted to use
  9841.                    switches X, Y, and Z for a command, you could type them
  9842.                    three different ways:
  9843.  
  9844.                         command /x /y /z
  9845.  
  9846.  
  9847.           ___________________________________________________________________
  9848.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  165
  9849.  
  9850.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  9851.           ___________________________________________________________________
  9852.  
  9853.  
  9854.                         command /x/y/z
  9855.                         command /xyz
  9856.  
  9857.                    A few switches, particularly in the DIR and SELECT
  9858.                    commands,  use two or more characters.  If you need to
  9859.                    follow a multi-letter switch with another switch, the
  9860.                    second switch must have its own slash to avoid ambiguity.
  9861.  
  9862.               Included in the format section is an explanation of each
  9863.               replaceable argument and a one or two word explanation of each
  9864.               switch.  Many descriptions also list related commands to help
  9865.               you find the exact command you want.
  9866.  
  9867.               After the command format, you'll find a description of the
  9868.               command's usage.  This description normally starts with the
  9869.               basic functions of a command and gradually adds more details.
  9870.               We've also included many examples to help you see the command
  9871.               in action.  In the examples, characters in bold type represent
  9872.               input from the user.  Characters in normal type represent 4DOS
  9873.               prompts or responses, or lines in a batch file.
  9874.  
  9875.               The last part of each description is a detailed explanation of
  9876.               the options or switches available for each command, in
  9877.               alphabetical order.  Occasionally, we've included more
  9878.               examples in this section to demonstrate how a switch is used
  9879.               or how multiple switches interact.
  9880.  
  9881.               Pay careful attention to the information about switch
  9882.               placement.  Some switches have different effects based on
  9883.               where they appear in the command line.  The effects of
  9884.               switches occasionally vary from one command to another in
  9885.               order to retain compatibility with traditional commands.
  9886.  
  9887.               In the Usage and Options sections you may see the symbol## .
  9888.               This indicates a more in-depth discussion or an advanced topic
  9889.               which you can skip if you are new to the command; come back to
  9890.               this topic later for more details, or if you're having trouble
  9891.               with the command.  In most cases the remainder of the section
  9892.               after such a symbol is devoted to similar information.
  9893.  
  9894.               The ## doesn't mean that only advanced users will need the
  9895.               information -- you may find it useful even if you're
  9896.               relatively new to computers or to 4DOS.  But it does mean that
  9897.               you can skip the marked section and still understand and use
  9898.               the basic features of the command.  If a ## appears before the
  9899.               "Usage" heading, it indicates that the entire command is
  9900.               generally used only in unusual situations or by more advanced
  9901.               users.
  9902.  
  9903.  
  9904.           ___________________________________________________________________
  9905.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  166
  9906.  
  9907.                                           CHAPTER 8 / COMMAND REFERENCE GUIDE
  9908.           ___________________________________________________________________
  9909.  
  9910.  
  9911.               When you see a ## in the list of options, remember that the
  9912.               options are listed alphabetically, so there may be more basic
  9913.               options discussed later in the list, after a more complex or
  9914.               advanced option marked with## .  Don't stop reading the option
  9915.               list the first time you see the mark.
  9916.  
  9917.               A ! to the left of a paragraph means that paragraph contains a
  9918.               caution or warning you may need to observe when using the
  9919.               feature it discusses.
  9920.  
  9921.  
  9922.  
  9923.  
  9924.  
  9925.  
  9926.  
  9927.  
  9928.  
  9929.  
  9930.  
  9931.  
  9932.  
  9933.  
  9934.  
  9935.  
  9936.  
  9937.  
  9938.  
  9939.  
  9940.  
  9941.  
  9942.  
  9943.  
  9944.  
  9945.  
  9946.  
  9947.  
  9948.  
  9949.  
  9950.  
  9951.  
  9952.  
  9953.  
  9954.  
  9955.  
  9956.  
  9957.  
  9958.  
  9959.  
  9960.  
  9961.           ___________________________________________________________________
  9962.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  167
  9963.  
  9964.                                     CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ?
  9965.           ___________________________________________________________________
  9966.  
  9967.  
  9968.           ?                                                             (New)
  9969.  
  9970.           Purpose:    Display a list of 4DOS commands.
  9971.  
  9972.           Format:     ?
  9973.  
  9974.           Usage:      ? displays a list of 4DOS internal commands.  For help
  9975.                       with these commands, and with external DOS commands,
  9976.                       see the HELP command.
  9977.  
  9978.                       When you use the ? command, you will see a display like
  9979.                       this:
  9980.  
  9981.                            c:\> ?
  9982.                            ?            ALIAS       ATTRIB       BEEP
  9983.                            BREAK        CALL        CANCEL       CD
  9984.                            CDD          CHCP        CHDIR        CLS
  9985.                            COLOR        COPY        CTTY         DATE
  9986.                            DEL          DELAY       DESCRIBE     DIR
  9987.                            DIRS         DRAWBOX     DRAWHLINE    DRAWVLINE
  9988.                            ECHO         ECHOS       ENDLOCAL     ERASE
  9989.                            ESET         EXCEPT      EXIT         FOR
  9990.                            FREE         GLOBAL      GOSUB        GOTO
  9991.                            HELP         HISTORY     IF           IFF
  9992.                            INKEY        INPUT       KEYSTACK     LH
  9993.                            LIST         LOADBTM     LOADHIGH     LOG
  9994.                            MD           MEMORY      MKDIR        MOVE
  9995.                            PATH         PAUSE       POPD         PROMPT
  9996.                            PUSHD        QUIT        RD           REBOOT
  9997.                            REM          REN         RENAME       RETURN
  9998.                            RMDIR        SCREEN      SCRPUT       SELECT
  9999.                            SET          SETDOS      SETLOCAL     SHIFT
  10000.                            SWAPPING     TEE         TEXT         TIME
  10001.                            TIMER        TRUENAME    TYPE         UNALIAS
  10002.                            UNSET        VER         VERIFY       VOL
  10003.                            VSCRPUT      Y
  10004.  
  10005.                       If you have disabled a command with the SETDOS /I
  10006.                       command, it will not appear in the list.
  10007.  
  10008.  
  10009.  
  10010.  
  10011.  
  10012.  
  10013.  
  10014.  
  10015.  
  10016.  
  10017.  
  10018.           ___________________________________________________________________
  10019.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  168
  10020.  
  10021.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10022.           ___________________________________________________________________
  10023.  
  10024.  
  10025.           ALIAS                                                         (New)
  10026.  
  10027.           Purpose:    Create new command names that execute one or more
  10028.                       commands or redefine default options for existing
  10029.                       commands;  assign commands to keystrokes;  load or
  10030.                       display the list of defined alias names.
  10031.  
  10032.           Format:     ALIAS [/P /R file...] [name[=][value]]
  10033.  
  10034.                       file:  One or more files to read for alias definitions.
  10035.                       name:  Name for an alias, or the key to execute the
  10036.                       alias.
  10037.                       value:  Text (commands, etc.) to be substituted for the
  10038.                       alias name.
  10039.  
  10040.                       /P(ause)                    /R(ead file)
  10041.  
  10042.                       See also: UNALIAS and page 96.
  10043.  
  10044.           Usage:      The ALIAS command lets you create new command names or
  10045.                       redefine the 4DOS internal commands.  It also lets you
  10046.                       assign one or more commands to a single keystroke.  An
  10047.                       alias is often used to execute a complex series of
  10048.                       commands with a few keystrokes or to create "in memory
  10049.                       batch files" that run much faster than disk-based batch
  10050.                       files.
  10051.  
  10052.                       For example, if you would rather type D instead of DIR
  10053.                       /W you would use the command:
  10054.  
  10055.                            c:\> alias d = `dir /w`
  10056.  
  10057.                       Now when you type a single d as a command, 4DOS will
  10058.                       translate it into a DIR /W command.  The marks around
  10059.                       DIR /W in the ALIAS command are back-quotes, below the
  10060.                       tilde [~] on most PC keyboards.  They are NOT single
  10061.                       quotes ['].
  10062.  
  10063.                       An alias can represent more than one command.  For
  10064.                       example:
  10065.  
  10066.                            c:\> alias letters = `cd \letters ^ text`
  10067.  
  10068.                       creates a new command called LETTERS.  The command
  10069.                       first uses CD to change to a subdirectory called
  10070.                       \LETTERS and then runs a program called TEXT.  The
  10071.                       caret [^] is the 4DOS command separator and tells 4DOS
  10072.  
  10073.  
  10074.  
  10075.           ___________________________________________________________________
  10076.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  169
  10077.  
  10078.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10079.           ___________________________________________________________________
  10080.  
  10081.  
  10082.                       that the two commands are distinct and should be
  10083.                       executed sequentially.
  10084.  
  10085.                       When you type alias commands at the command line or in
  10086.                       a batch file, you MUST use back quotes around the
  10087.                       definition if it contains multiple commands or any
  10088.                       replaceable parameters (which are discussed below), to
  10089.                       prevent premature expansion of the arguments.  You MAY
  10090.                       use back quotes [`] around other definitions, but they
  10091.                       are not required.  To avoid confusion, we recommend
  10092.                       that you always use back quotes around alias
  10093.                       definitions you type at the command line or enter in a
  10094.                       batch file.
  10095.  
  10096.                       Aliases may invoke internal 4DOS commands, external
  10097.                       commands, or other aliases.  (However, an alias may not
  10098.                       invoke itself, except in special cases where an IF or
  10099.                       IFF command is used to prevent an infinite loop.)  The
  10100.                       two aliases below demonstrate alias nesting (one alias
  10101.                       invoking another).  The first line defines an alias
  10102.                       which runs a program called WP.EXE that is in the
  10103.                       E:\WP51\ subdirectory.  The second alias changes
  10104.                       directories with the PUSHD command, runs the WP alias,
  10105.                       and then returns to the original directory with the
  10106.                       POPD command:
  10107.  
  10108.                            c:\> alias wp = `e:\wp51\wp.exe`
  10109.                            c:\> alias w = `pushd c:\wp ^ wp ^ popd`
  10110.  
  10111.                       The second alias above could have included the full
  10112.                       path and name of the WP.EXE program instead of calling
  10113.                       the WP alias.  However, writing two aliases makes the
  10114.                       second one easier to read and understand, and makes the
  10115.                       first alias available for independent use.  If you
  10116.                       rename the WP.EXE program or move it to a new
  10117.                       directory, only the first alias needs to rewritten.
  10118.  
  10119.                       If you put an asterisk [*] immediately before a command
  10120.                       in the value of an alias definition (the part after the
  10121.                       equal sign), it tells 4DOS not to attempt to interpret
  10122.                       that command as another (nested) alias.  An asterisk
  10123.                       used this way must be preceded by a space or caret [^]
  10124.                       and followed immediately by an internal or external
  10125.                       command name.  The asterisk is used to make sure that
  10126.                       4DOS interprets the following word as the name of an
  10127.                       internal or external command instead of as an alias
  10128.                       which may have the same name.  It also allows two
  10129.                       popular uses of aliases.
  10130.  
  10131.  
  10132.           ___________________________________________________________________
  10133.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  170
  10134.  
  10135.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10136.           ___________________________________________________________________
  10137.  
  10138.  
  10139.                       By using an asterisk, you can redefine the default
  10140.                       options for any 4DOS command.  For example, suppose
  10141.                       that you always want to use the DIR command with the /2
  10142.                       (two column) and /P (pause at the end of each page)
  10143.                       options.  The following line will do just that:
  10144.  
  10145.                            c:\> alias dir = `*dir /2/p`
  10146.  
  10147.                       If you didn't include the asterisk, 4DOS would
  10148.                       interpret the second DIR on the line as the name of the
  10149.                       alias itself and attempt to repeatedly re-invoke the
  10150.                       DIR alias, rather than running the DIR command.  This
  10151.                       would cause an "Alias loop" or "Command line too long"
  10152.                       error.  The asterisk tells 4DOS to interpret the second
  10153.                       DIR as a command but not as an alias.
  10154.  
  10155.                       An asterisk also helps you keep the names of internal
  10156.                       4DOS commands from conflicting with the names of
  10157.                       external programs.  For example, suppose you have a
  10158.                       program called LIST.COM.  Normally, the 4DOS internal
  10159.                       command will run anytime you type LIST.  But two simple
  10160.                       aliases will give you access to both the LIST.COM
  10161.                       program and the LIST command:
  10162.  
  10163.                            c:\> alias list = `c:\util\list.com`
  10164.                            c:\> alias display = `*list`
  10165.  
  10166.                       The first line above defines LIST as an alias for the
  10167.                       LIST.COM program.  If you stopped there, the external
  10168.                       program would run every time you typed LIST and you
  10169.                       would not have easy access to the internal 4DOS LIST
  10170.                       command.  The second line renames the internal LIST
  10171.                       command as DISPLAY.  The asterisk is needed in the
  10172.                       second command to tell 4DOS that the following word
  10173.                       means the internal command LIST, not the LIST alias
  10174.                       which runs your external program.
  10175.  
  10176.                       Another way to understand the asterisk is to remember
  10177.                       that when 4DOS processes a command it always checks for
  10178.                       an alias first, then looks for an internal or external
  10179.                       command, or a batch file (see page 43).  The asterisk
  10180.                       at the beginning of a command name simply tells 4DOS to
  10181.                       skip over the usual check for aliases when processing
  10182.                       that command, and go straight to checking for an
  10183.                       internal command, external command, or batch file.
  10184.  
  10185.                       You can also use an asterisk before a command that you
  10186.                       enter at the command line or in a batch file.  If you
  10187.  
  10188.  
  10189.           ___________________________________________________________________
  10190.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  171
  10191.  
  10192.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10193.           ___________________________________________________________________
  10194.  
  10195.  
  10196.                       do, 4DOS won't try to interpret that command as an
  10197.                       alias.  This can be useful when you want to be sure you
  10198.                       are running the true, original command and not an alias
  10199.                       with the same name, or temporarily defeat the purpose
  10200.                       of an alias which changes the meaning or behavior of a
  10201.                       command.  For example, above we defined an alias for
  10202.                       DIR which made directories display in 2-column paged
  10203.                       mode by default.  If you wanted to see a directory
  10204.                       display in the normal single-column, non-paged mode,
  10205.                       you could enter the command *DIR and the alias would be
  10206.                       ignored during that one command.
  10207.  
  10208.                       You can also use an asterisk in the name of an alias.
  10209.                       When you do, the characters following the asterisk are
  10210.                       optional when you invoke the alias command.  (Use of an
  10211.                       asterisk in the alias name is unrelated to the use of
  10212.                       an asterisk in the alias value discussed above.)  For
  10213.                       example, with this alias:
  10214.  
  10215.                            c:\> alias wher*eis = `dir /sp`
  10216.  
  10217.                       the new command, WHEREIS, can be invoked as WHER,
  10218.                       WHERE, WHEREI, or WHEREIS.  Now if you type:
  10219.  
  10220.                            c:\> where myfile.txt
  10221.  
  10222.                       4DOS will expand the WHEREIS alias and process the
  10223.                       command:
  10224.  
  10225.                            dir /sp myfile.txt
  10226.  
  10227.                       If you want to assign an alias to a keystroke, use the
  10228.                       keyname on the left side of the equal sign, preceded by
  10229.                       an at-sign [@].  For example, to assign the command DIR
  10230.                       /W to the F5 key, type
  10231.  
  10232.                            c:\> alias @F5 = `dir /w`
  10233.  
  10234.                       Keynames must be in the form
  10235.  
  10236.                                 [Prefix-]Keyname
  10237.  
  10238.                       The key prefix can be any one of the following:
  10239.  
  10240.                         No prefix  followed by F1 - F12
  10241.                         Alt        followed by A - Z, 0 - 9, F1 - F12, or
  10242.                                    Bksp
  10243.  
  10244.  
  10245.  
  10246.           ___________________________________________________________________
  10247.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  172
  10248.  
  10249.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10250.           ___________________________________________________________________
  10251.  
  10252.  
  10253.                         Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  10254.                                    Left, Right, Home, End, PgUp, PgDn, Ins,
  10255.                                    or Del
  10256.  
  10257.                       The possible key names are:
  10258.  
  10259.                         A - Z         Enter         PgDn
  10260.                         0 - 9         Up            Home
  10261.                         F1 - F12      Down          End
  10262.                         Esc           Left          Ins
  10263.                         Bksp          Right         Del
  10264.                         Tab           PgUp
  10265.  
  10266.                       All key names must be spelled as shown, and can be
  10267.                       abbreviated as long as the abbreviation is unique and
  10268.                       unambiguous.  Alphabetic keys can be specified in
  10269.                       upper-case or lower-case.  You cannot specify a
  10270.                       punctuation key.
  10271.  
  10272.                       The prefix and key name must be separated by a dash.
  10273.                       You can also define a keystroke alias by using "@" plus
  10274.                       a scan code for one of the permissible keys (see
  10275.                       Appendix B on page 325 for a list of scan codes).
  10276.  
  10277.                       When you define keystroke aliases, the assignments will
  10278.                       only be in effect at the 4DOS command line, not inside
  10279.                       application programs.  Be careful not to assign aliases
  10280.                       to keys that are already used at the command-line (like
  10281.                       F1 for Help).  The command-line meanings take
  10282.                       precedence and the keystroke alias will never be
  10283.                       invoked.  If you want to use one of the command-line
  10284.                       keys for an alias instead of its normal meaning, you
  10285.                       must first disable its regular use with the NormalKey
  10286.                       or NormalEditKey directive in your 4DOS.INI file.  See
  10287.                       page 132 for instructions.
  10288.  
  10289.                       If you define a keystroke alias like this:
  10290.  
  10291.                            c:\> @f5 = `dir /w`
  10292.  
  10293.                       then, when you press the F5 key, 4DOS will enter the
  10294.                       value, "dir /w" on the command line for you.  You can
  10295.                       type additional parameters if you wish and then press
  10296.                       Enter to execute the command.  With this particular
  10297.                       alias, you can define the files that you want to
  10298.                       display after pressing F5 and before pressing Enter to
  10299.                       execute the command.
  10300.  
  10301.  
  10302.  
  10303.           ___________________________________________________________________
  10304.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  173
  10305.  
  10306.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10307.           ___________________________________________________________________
  10308.  
  10309.  
  10310.                       If you want the keystroke alias to take action
  10311.                       automatically without waiting for you to edit the
  10312.                       command line or press Enter, you must end the value
  10313.                       with a carriage return.  To enter the carriage return
  10314.                       into your alias use the 4DOS escape character (normally
  10315.                       Ctrl-X, shown here as "^X") twice, followed by an "r."
  10316.                       For example, this command will assign an alias to the
  10317.                       F6 key that uses the CDD command to take you back to
  10318.                       the previous default directory:
  10319.  
  10320.                            c:\> alias @f6 = `cdd -^X^Xr`
  10321.  
  10322.                       If you define a keystroke alias in an ALIAS /R file and
  10323.                       you want an the alias to start automatically, use a
  10324.                       single ^X character before the "r" at the end of the
  10325.                       line.  The double ^X is only required when the alias is
  10326.                       defined on the command line or in a batch file.
  10327.  
  10328.                       If you want to see a list of all current ALIAS
  10329.                       commands, type
  10330.  
  10331.                            c:\> alias
  10332.  
  10333.                       You can also view the definition of a single alias.  If
  10334.                       you want to see the definition of the alias LIST, you
  10335.                       can type
  10336.  
  10337.                            c:\> alias list
  10338.  
  10339.                       You can save the list to a file called ALIAS.LST this
  10340.                       way:
  10341.  
  10342.                            c:\> alias > alias.lst
  10343.  
  10344.                       You can then reload all the alias definitions in the
  10345.                       file the next time you boot up with the command
  10346.  
  10347.                            c:\> alias /r alias.lst
  10348.  
  10349.                       This is much faster than defining each alias
  10350.                       individually in a batch file.  If you keep your alias
  10351.                       definitions in a separate file which you load from
  10352.                       AUTOEXEC.BAT, you can edit them with a text editor,
  10353.                       reload the edited file with the ALIAS /R command, and
  10354.                       know that the same alias list will be loaded the next
  10355.                       time you boot your computer.
  10356.  
  10357.  
  10358.  
  10359.  
  10360.           ___________________________________________________________________
  10361.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  174
  10362.  
  10363.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10364.           ___________________________________________________________________
  10365.  
  10366.  
  10367.                       When you define aliases in a file that will be read
  10368.                       with the ALIAS /R command, you should NOT use back
  10369.                       quotes around the value, even if back-quotes would
  10370.                       normally be required when defining the same alias at
  10371.                       the command line or in a batch file.
  10372.  
  10373.                       To remove an alias, use the UNALIAS command.
  10374.  
  10375.                   ##  Alias commands can use command-line arguments or
  10376.                       replaceable parameters like those in batch files.  4DOS
  10377.                       numbers the command line arguments from %1 to %127.  It
  10378.                       is up to the alias to determine the meaning of each
  10379.                       argument.  Arguments that are referred to in an alias,
  10380.                       but which are missing on the command line, appear as
  10381.                       empty strings inside the alias.
  10382.  
  10383.                       The parameter %n& has a special meaning.  4DOS
  10384.                       interprets it to mean "the entire command line, from
  10385.                       argument n to the end."  If n is not specified, it has
  10386.                       a default value of 1, so %& means "the entire command
  10387.                       line after the alias name."  The special parameter %#
  10388.                       contains the number of command line arguments.  Aliases
  10389.                       do not have access to %0, which is used only in batch
  10390.                       files.
  10391.  
  10392.                       For example, the following alias will change
  10393.                       directories, perform a command, and return to the
  10394.                       original directory:
  10395.  
  10396.                            c:\> alias in `pushd %1 ^ %2& ^ popd`
  10397.  
  10398.                       When this alias is invoked as:
  10399.  
  10400.                            c:\> in c:\comm mycomm /xmodem /2400
  10401.  
  10402.                       the first replaceable parameter, %1, has the value
  10403.                       "c:\comm."  %2 is "mycomm," %3 is "/xmodem," and %4 is
  10404.                       "/2400".  4DOS expands the command line into these
  10405.                       three separate commands:
  10406.  
  10407.                            pushd c:\comm
  10408.                            mycomm /xmodem /2400
  10409.                            popd
  10410.  
  10411.                   ##  This next example uses the IFF command to redefine the
  10412.                       defaults for SET only if no other options are entered
  10413.                       on the command line.  This ALIAS command should be
  10414.                       entered on one line:
  10415.  
  10416.  
  10417.           ___________________________________________________________________
  10418.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  175
  10419.  
  10420.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10421.           ___________________________________________________________________
  10422.  
  10423.  
  10424.                            c:\> alias set = `iff %#==0 then ^ *set /p ^
  10425.                                 else ^ *set %& ^ endiff`
  10426.  
  10427.                       This example modifies the SET command so that if SET is
  10428.                       entered with no arguments, it is replaced by SET /P
  10429.                       (pause after displaying each page), but if SET is
  10430.                       followed by an argument, it behaves normally.  Note the
  10431.                       use of asterisks (*set) to prevent alias loops.
  10432.  
  10433.                   ##  If an alias uses replaceable parameters, 4DOS will
  10434.                       delete command line arguments up to and including the
  10435.                       highest referenced argument.  For example, if you have
  10436.                       an alias which refers only to %1 and %4, then the first
  10437.                       and fourth arguments passed to the alias will be used,
  10438.                       the second and third arguments will be discarded, and
  10439.                       any additional arguments beyond the fourth will be
  10440.                       appended to the end of the expanded command after the
  10441.                       value portion of the alias.  If an alias uses no
  10442.                       replaceable parameters, all of the command line
  10443.                       arguments will be appended to the expanded command.
  10444.  
  10445.                   ##  Aliases also have full access to all variables in the
  10446.                       environment, 4DOS's internal variables, and 4DOS's
  10447.                       variable functions.  For example, you can create a
  10448.                       simple command-line calculator this way (enter this on
  10449.                       one line):
  10450.  
  10451.                            c:\> alias calc = `echo The answer is:
  10452.                                 %@eval[%&]`
  10453.  
  10454.                       Now, if you enter
  10455.  
  10456.                            c:\> calc 5 * 6
  10457.  
  10458.                       4DOS will display
  10459.  
  10460.                            The answer is: 30
  10461.  
  10462.                   ##  Aliases created in the primary shell will be inherited
  10463.                       automatically in a secondary shell.  However, an alias
  10464.                       created in a secondary shell will not be passed back to
  10465.                       a primary or parent shell.
  10466.  
  10467.           Options:    /P(ause):  This option is only effective when ALIAS is
  10468.                       used to display existing definitions.  It pauses the
  10469.                       display after each page and waits for a keystroke
  10470.                       before continuing.
  10471.  
  10472.  
  10473.  
  10474.           ___________________________________________________________________
  10475.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  176
  10476.  
  10477.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ALIAS
  10478.           ___________________________________________________________________
  10479.  
  10480.  
  10481.                       /R(ead file):  This option loads an alias list from a
  10482.                       file.  The format of the file is the same as that of
  10483.                       the ALIAS display:
  10484.  
  10485.                                 name=value
  10486.  
  10487.                       where name is the name of the alias and value is its
  10488.                       value.  You can use an equal sign [=] or space to
  10489.                       separate the name and value.  Back-quotes should NOT be
  10490.                       used around the value.  You can add comments to the
  10491.                       file by starting each comment line with a colon [:].
  10492.                       You can load multiple files with one ALIAS /R command
  10493.                       by placing the names one after another on the command
  10494.                       line, separated by spaces:
  10495.  
  10496.                            c:\> alias /r alias1.lst alias2.lst
  10497.  
  10498.  
  10499.  
  10500.  
  10501.  
  10502.  
  10503.  
  10504.  
  10505.  
  10506.  
  10507.  
  10508.  
  10509.  
  10510.  
  10511.  
  10512.  
  10513.  
  10514.  
  10515.  
  10516.  
  10517.  
  10518.  
  10519.  
  10520.  
  10521.  
  10522.  
  10523.  
  10524.  
  10525.  
  10526.  
  10527.  
  10528.  
  10529.  
  10530.  
  10531.           ___________________________________________________________________
  10532.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  177
  10533.  
  10534.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ATTRIB
  10535.           ___________________________________________________________________
  10536.  
  10537.  
  10538.           ATTRIB                                                        (New)
  10539.  
  10540.           Purpose:    Change or view file and subdirectory attributes.
  10541.  
  10542.           Format:     ATTRIB [/D /Q /S] [+|-[AHRS]] files
  10543.  
  10544.                       files: A file, directory, or list of files or
  10545.                       directories, on which to operate.
  10546.  
  10547.                       /D(irectories)                   /S(ubdirectories)
  10548.                       /Q(uiet)
  10549.  
  10550.                       Attribute flags:
  10551.  
  10552.                            +A   Set the archive attribute
  10553.                            -A   Clear the archive attribute
  10554.                            +H   Set the hidden attribute
  10555.                            -H   Clear the hidden attribute
  10556.                            +R   Set the read-only attribute
  10557.                            -R   Clear the read-only attribute
  10558.                            +S   Set the system attribute
  10559.                            -S   Clear the system attribute
  10560.  
  10561.           Usage:      Every file and subdirectory has 4 attributes that can
  10562.                       be turned on (set) or turned off (cleared): Archive,
  10563.                       Hidden, Read-only, and System.  DOS sets the Archive
  10564.                       attribute every time a file is updated or changed.
  10565.                       Backup utilities often use this attribute to find files
  10566.                       that have changed since the last general backup.  DOS
  10567.                       prevents programs from altering or erasing files that
  10568.                       have the Read-only attribute set (but applications can
  10569.                       change the attribute first and then update or erase the
  10570.                       file).  Files with Hidden and/or System attributes are
  10571.                       normally not visible in directory listings.
  10572.  
  10573.                       The ATTRIB command lets you set or clear any
  10574.                       attribute(s) for any file, group of files, or
  10575.                       subdirectory.  You can view file attributes by entering
  10576.                       ATTRIB without specifying new attributes (i.e. without
  10577.                       the [+|-[AHRS]] part of the format), or with the DIR /T
  10578.                       command.
  10579.  
  10580.                       For example, you can set the read-only and hidden
  10581.                       attributes for the file MEMO:
  10582.  
  10583.                            c:\> attrib +rh memo
  10584.  
  10585.  
  10586.  
  10587.  
  10588.           ___________________________________________________________________
  10589.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  178
  10590.  
  10591.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ATTRIB
  10592.           ___________________________________________________________________
  10593.  
  10594.  
  10595.                       Attribute options apply to the file(s) that follow the
  10596.                       options on the ATTRIB command line.  The example below
  10597.                       shows how to set different attributes on different
  10598.                       files with a single command.  It sets the archive
  10599.                       attribute for all .TXT files, and changes TEST.COM to
  10600.                       system and not modified:
  10601.  
  10602.                            c:\> attrib +a *.txt +s -a test.com
  10603.  
  10604.                   ##  You may know that DOS also supports "D" (subdirectory)
  10605.                       and "V" (volume label) attributes.  These attributes
  10606.                       cannot be altered with ATTRIB;  they are designed to be
  10607.                       controlled only by DOS itself.
  10608.  
  10609.           Options:    /D(irectories):  If you don't use this option, ATTRIB
  10610.                       will only modify file attributes.  If you use the /D
  10611.                       option, ATTRIB will also modify the attributes of
  10612.                       subdirectories (yes, you can have a hidden
  10613.                       subdirectory):
  10614.  
  10615.                            c:\> attrib /d +h c:\mydir
  10616.  
  10617.                       /Q(uiet):  This option turns off ATTRIB's normal screen
  10618.                       output.  It is most useful in batch files.
  10619.  
  10620.                       /S(ubdirectories):  If you use the /S option, the
  10621.                       ATTRIB command will be applied to all matching files in
  10622.                       the current or named directory and all of its
  10623.                       subdirectories.
  10624.  
  10625.  
  10626.  
  10627.  
  10628.  
  10629.  
  10630.  
  10631.  
  10632.  
  10633.  
  10634.  
  10635.  
  10636.  
  10637.  
  10638.  
  10639.  
  10640.  
  10641.  
  10642.  
  10643.  
  10644.  
  10645.           ___________________________________________________________________
  10646.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  179
  10647.  
  10648.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  BEEP
  10649.           ___________________________________________________________________
  10650.  
  10651.  
  10652.           BEEP                                                          (New)
  10653.  
  10654.           Purpose:    Beep the speaker or play simple music.
  10655.  
  10656.           Format:     BEEP [frequency duration ...]
  10657.  
  10658.                       frequency  is in Hertz (cycles per second).
  10659.                       duration  is in 1/18th second intervals
  10660.  
  10661.           Usage:      BEEP generates a sound through your computer's speaker.
  10662.                       It is normally used in batch files to signal that an
  10663.                       operation has been completed, or that the computer
  10664.                       needs attention.
  10665.  
  10666.                       Because BEEP allows you to specify the frequency and
  10667.                       duration of the sound, you can also use it to play
  10668.                       simple music or to create different kinds of signals
  10669.                       for the user.
  10670.  
  10671.                       You can include as many frequency and duration pairs as
  10672.                       you wish.  No sound will be generated for frequencies
  10673.                       less than 20 Hz, allowing you to insert short delays.
  10674.                       The default value for frequency is 440 Hz; the default
  10675.                       value for duration is 2.
  10676.  
  10677.                       This batch file fragment runs a program called DEMO,
  10678.                       then plays a few notes and waits for you to press a
  10679.                       key:
  10680.  
  10681.                            demo ^ beep 440 4  600 2  1040 6
  10682.                            pause Finished with the demo - hit a key...
  10683.  
  10684.                       The following table gives the frequency values for a
  10685.                       five octave range (middle C is 523 Hz):
  10686.  
  10687.                            C      131   262   523   1046  2093
  10688.                            C#/Db  139   277   554   1108  2217
  10689.                            D      147   294   587   1174  2349
  10690.                            D#/Eb  156   311   622   1244  2489
  10691.                            E      165   330   659   1318  2637
  10692.                            F      175   349   698   1397  2794
  10693.                            F#/Gb  185   370   740   1480  2960
  10694.                            G      196   392   784   1568  3136
  10695.                            G#/Ab  208   415   831   1662  3322
  10696.                            A      220   440   880   1760  3520
  10697.                            A#/Bb  233   466   932   1864  3729
  10698.                            B      248   494   988   1976  3951
  10699.  
  10700.  
  10701.  
  10702.           ___________________________________________________________________
  10703.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  180
  10704.  
  10705.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  BREAK
  10706.           ___________________________________________________________________
  10707.  
  10708.  
  10709.           BREAK                                                  (Compatible)
  10710.  
  10711.           Purpose:    Display, enable, or disable Ctrl-C and Ctrl-BREAK
  10712.                       checking.
  10713.  
  10714.           Format:     BREAK [ON | OFF]
  10715.  
  10716.           Usage:      The Ctrl-C and Ctrl-Break keys are used by many
  10717.                       programs (including 4DOS) as a signal to interrupt the
  10718.                       current operation.  BREAK controls how often DOS checks
  10719.                       to see if you've entered one of these keystrokes.
  10720.  
  10721.                       Normally, BREAK is turned off, and DOS only checks for
  10722.                       Ctrl-C and Ctrl-Break keystrokes during normal DOS
  10723.                       input or output operations involving the screen,
  10724.                       keyboard, serial port, and printer.  However many
  10725.                       programs don't use DOS for these operations, and it can
  10726.                       be difficult to interrupt them.
  10727.  
  10728.                       When BREAK is turned ON, DOS checks for Ctrl-C and
  10729.                       Ctrl-Break every time a program calls DOS.  Since most
  10730.                       programs use DOS to access files and perform other
  10731.                       functions, turning BREAK on makes it much more likely
  10732.                       that a Ctrl-C or Ctrl-Break will be noticed.  If you
  10733.                       turn BREAK on, programs will run slightly slower than
  10734.                       normal (the difference is not usually noticeable), but
  10735.                       you will be able to break out of some programs more
  10736.                       easily.
  10737.  
  10738.                       Turning BREAK on or off only affects when DOS detects
  10739.                       Ctrl-C and Ctrl-Break and notifies the program you're
  10740.                       running.  Any program can choose to ignore these
  10741.                       signals, in which case the BREAK setting won't affect
  10742.                       that program's behavior.  Also, any external program
  10743.                       can change the BREAK setting on its own.
  10744.  
  10745.                       Type BREAK by itself to display the current BREAK
  10746.                       status:
  10747.  
  10748.                            c:\> break
  10749.                            BREAK is OFF
  10750.  
  10751.                       Type BREAK plus ON or OFF to set the BREAK status:
  10752.  
  10753.                            c:\> break on
  10754.  
  10755.                       BREAK is off by default.  You can change the default by
  10756.                       adding the following line to your CONFIG.SYS file:
  10757.  
  10758.  
  10759.           ___________________________________________________________________
  10760.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  181
  10761.  
  10762.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  BREAK
  10763.           ___________________________________________________________________
  10764.  
  10765.  
  10766.                            break=on
  10767.  
  10768.  
  10769.  
  10770.  
  10771.  
  10772.  
  10773.  
  10774.  
  10775.  
  10776.  
  10777.  
  10778.  
  10779.  
  10780.  
  10781.  
  10782.  
  10783.  
  10784.  
  10785.  
  10786.  
  10787.  
  10788.  
  10789.  
  10790.  
  10791.  
  10792.  
  10793.  
  10794.  
  10795.  
  10796.  
  10797.  
  10798.  
  10799.  
  10800.  
  10801.  
  10802.  
  10803.  
  10804.  
  10805.  
  10806.  
  10807.  
  10808.  
  10809.  
  10810.  
  10811.  
  10812.  
  10813.  
  10814.  
  10815.  
  10816.           ___________________________________________________________________
  10817.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  182
  10818.  
  10819.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CALL
  10820.           ___________________________________________________________________
  10821.  
  10822.  
  10823.           CALL                                                   (Compatible)
  10824.  
  10825.           Purpose:    Execute one batch file from within another.
  10826.  
  10827.           Format:     CALL file
  10828.  
  10829.                       file: The batch file to execute.
  10830.  
  10831.                       See also CANCEL and QUIT.
  10832.  
  10833.           Usage:      CALL allows batch files to call other batch files
  10834.                       (batch file nesting) without starting a secondary copy
  10835.                       of the command processor.  The calling batch file is
  10836.                       suspended while the called (second) batch file runs.
  10837.                       When the second batch file finishes, the original batch
  10838.                       file resumes execution at the next command.  If you
  10839.                       execute a batch file from inside another batch file
  10840.                       without using CALL, the first batch file is terminated
  10841.                       before the second one starts.
  10842.  
  10843.                       The following batch file fragment compares an input
  10844.                       line to "wp" and calls another batch file if it
  10845.                       matches:
  10846.  
  10847.                            input  Enter your choice:  %%option
  10848.                            if "%option" == "wp" call wp.bat
  10849.  
  10850.                       4DOS supports batch file nesting up to ten levels deep.
  10851.  
  10852.                       The current ECHO state will be inherited by a called
  10853.                       batch file.
  10854.  
  10855.                   ##  A called batch file will return to the calling file
  10856.                       after processing the last line in the called file, or
  10857.                       when a QUIT command is executed.  A called batch file
  10858.                       should always return in this way, or terminate all
  10859.                       batch files with CANCEL.  Restarting (or CALLing) the
  10860.                       original batch file from within a called file will
  10861.                       prevent 4DOS from detecting that you've left the second
  10862.                       file, and it may cause an infinite loop or a stack
  10863.                       overflow.
  10864.  
  10865.  
  10866.  
  10867.  
  10868.  
  10869.  
  10870.  
  10871.  
  10872.  
  10873.           ___________________________________________________________________
  10874.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  183
  10875.  
  10876.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CANCEL
  10877.           ___________________________________________________________________
  10878.  
  10879.  
  10880.           CANCEL                                                        (New)
  10881.  
  10882.           Purpose:    Terminate batch file processing.
  10883.  
  10884.           Format:     CANCEL
  10885.  
  10886.                       See also: CALL and QUIT.
  10887.  
  10888.           Usage:      The CANCEL command ends all batch file processing,
  10889.                       regardless of the batch file nesting level.  Use QUIT
  10890.                       to end a nested batch file and return to the previous
  10891.                       batch file.
  10892.  
  10893.                       You can CANCEL at any point in a batch file.
  10894.  
  10895.                       The following batch file fragment compares an input
  10896.                       line to "end" and terminates all batch file processing
  10897.                       if it matches:
  10898.  
  10899.                            input Enter your choice:  %%option
  10900.                            if "%option" == "end" cancel
  10901.  
  10902.  
  10903.  
  10904.  
  10905.  
  10906.  
  10907.  
  10908.  
  10909.  
  10910.  
  10911.  
  10912.  
  10913.  
  10914.  
  10915.  
  10916.  
  10917.  
  10918.  
  10919.  
  10920.  
  10921.  
  10922.  
  10923.  
  10924.  
  10925.  
  10926.  
  10927.  
  10928.  
  10929.  
  10930.           ___________________________________________________________________
  10931.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  184
  10932.  
  10933.                            CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CD / CHDIR
  10934.           ___________________________________________________________________
  10935.  
  10936.  
  10937.           CD / CHDIR                                               (Enhanced)
  10938.  
  10939.           Purpose:    Display or change the current directory.
  10940.  
  10941.           Format:     CD [ path | - ]
  10942.                            or
  10943.                       CHDIR [ path | - ]
  10944.  
  10945.                       path: The directory to change to, including an optional
  10946.                       drive name.
  10947.  
  10948.                       See also: CDD, MD, PUSHD, RD, and CDPATH on page 116.
  10949.  
  10950.           Usage:      CD and CHDIR are synonyms.  You can use either one.
  10951.  
  10952.                       CD lets you navigate through the DOS subdirectory
  10953.                       structure by changing the current working directory.
  10954.                       If you enter CD and a directory name, the named
  10955.                       directory becomes the new current directory.  For
  10956.                       example, to change to the subdirectory
  10957.                       C:\FINANCE\MYFILES:
  10958.  
  10959.                            c:\> cd \finance\myfiles
  10960.                            c:\finance\myfiles>
  10961.  
  10962.                       Every disk drive on the system has its own current
  10963.                       directory.  Specifying both a drive and a directory in
  10964.                       the CD command will change the current directory on the
  10965.                       specified drive, but will not change the default drive.
  10966.                       For example, to change the default directory on drive
  10967.                       A:
  10968.  
  10969.                            c:\> cd a:\utility
  10970.                            c:\>
  10971.  
  10972.                       Notice that this command does not change to drive A:.
  10973.                       Use the CDD command to change both the drive and
  10974.                       directory together.
  10975.  
  10976.                       You can change to the parent directory with CD ..; you
  10977.                       can also go up one additional directory level with each
  10978.                       additional [.].  For example, CD .... will go up three
  10979.                       levels in the directory tree.  You can move to a
  10980.                       sibling directory -- one that branches from the same
  10981.                       parent directory as the current subdirectory -- with
  10982.                       the command CD ..\newdir.
  10983.  
  10984.  
  10985.  
  10986.  
  10987.           ___________________________________________________________________
  10988.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  185
  10989.  
  10990.                            CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CD / CHDIR
  10991.           ___________________________________________________________________
  10992.  
  10993.  
  10994.                       If you enter CD with no argument or with only a disk
  10995.                       drive name, it will display the current directory on
  10996.                       the default or named drive.
  10997.  
  10998.                       CD saves the current directory before changing to a new
  10999.                       directory.  You can switch back to the previous
  11000.                       directory by entering CD -.  (There must be a space
  11001.                       between the CD command and the hyphen.)  You can switch
  11002.                       back and forth between two directories by repeatedly
  11003.                       entering CD -.  The saved directory is the same for
  11004.                       both the CD and CDD commands.
  11005.  
  11006.                   ##  CD never changes the default drive.  If you change
  11007.                       directories on one drive, switch to another drive, and
  11008.                       then enter CD -, the directory will be restored on the
  11009.                       first drive but the default drive and directory (on the
  11010.                       second drive) will not be changed.
  11011.  
  11012.                   ##  If CD can't change to the specified directory, it will
  11013.                       look for the CDPATH environment variable.  CD will
  11014.                       append the specified directory name to each directory
  11015.                       in CDPATH and attempt to change to that directory,
  11016.                       until the first match or the end of the CDPATH
  11017.                       argument.  This lets you use CDPATH as a quick way to
  11018.                       find commonly used subdirectories which have unique
  11019.                       names.  For example, if you are currently in the
  11020.                       directory C:\WP\LETTERS\JANUARY and you'd like to
  11021.                       change to C:\FINANCE\REPORTS, you could enter the
  11022.                       command:
  11023.  
  11024.                            c:\wp\letters\january> cd \finance\reports
  11025.  
  11026.                       However if the C:\FINANCE directory is listed in your
  11027.                       CDPATH variable, and is the first directory in the list
  11028.                       with a REPORTS subdirectory, you can simply enter the
  11029.                       command:
  11030.  
  11031.                            c:\wp\letters\january> cd reports
  11032.  
  11033.                       and 4DOS will change to C:\FINANCE\REPORTS.
  11034.  
  11035.                   ##  DOS will not accept directory names longer than 64
  11036.                       characters.  You must be sure that the complete
  11037.                       directory name from the root to your deepest
  11038.                       subdirectory fits within the 64 character restriction.
  11039.  
  11040.  
  11041.  
  11042.  
  11043.  
  11044.           ___________________________________________________________________
  11045.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  186
  11046.  
  11047.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CDD
  11048.           ___________________________________________________________________
  11049.  
  11050.  
  11051.           CDD                                                           (New)
  11052.  
  11053.           Purpose:    Change the current disk drive and directory.
  11054.  
  11055.           Format:     CDD path
  11056.  
  11057.                       path:  The name of the directory (or drive and
  11058.                       directory) to change to.
  11059.  
  11060.                       See also: CD, MD, PUSHD, RD, and CDPATH on page 116.
  11061.  
  11062.           Usage:      CDD is similar to the CD command, except that it also
  11063.                       changes the default disk drive if one is specified.
  11064.                       CDD will change to the directory and drive you name.
  11065.                       To change from the root directory on drive A to the
  11066.                       subdirectory C:\WP:
  11067.  
  11068.                            a:\> cdd c:\wp
  11069.                            c:\wp>
  11070.  
  11071.                       You can change to the parent directory with CDD ..; you
  11072.                       can also go up one additional directory level with each
  11073.                       additional [.].  For example, CDD .... will go up three
  11074.                       levels in the directory tree.
  11075.  
  11076.                       CDD saves the current drive and directory before
  11077.                       changing to a new directory.  You can switch back to
  11078.                       the previous drive and directory by entering CDD -.
  11079.                       (There must be a space between the CDD command and the
  11080.                       hyphen.)  You can switch back and forth between two
  11081.                       drives and directories by repeatedly entering CDD -.
  11082.                       The saved directory is the same for both the CD and CDD
  11083.                       commands.
  11084.  
  11085.                   ##  If CDD can't change to the specified directory, it will
  11086.                       look for the CDPATH environment variable.  CDD will
  11087.                       append the specified directory name to each directory
  11088.                       in CDPATH and attempt to change to that drive and
  11089.                       directory, until the first match or the end of the
  11090.                       CDPATH argument.  This allows you to use CDPATH as a
  11091.                       quick way to find commonly used subdirectories which
  11092.                       have unique names.  For example, if you are currently
  11093.                       in the directory C:\WP\LETTERS\JANUARY and you'd like
  11094.                       to change to D:\SOFTWARE\UTIL, you could enter the
  11095.                       command:
  11096.  
  11097.                            c:\wp\letters\january> cdd d:\software\util
  11098.  
  11099.  
  11100.  
  11101.           ___________________________________________________________________
  11102.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  187
  11103.  
  11104.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CDD
  11105.           ___________________________________________________________________
  11106.  
  11107.  
  11108.                       However if the D:\SOFTWARE directory is listed in your
  11109.                       CDPATH variable, and is the first directory in the list
  11110.                       with a UTIL subdirectory, you can simply enter the
  11111.                       command:
  11112.  
  11113.                            c:\wp\letters\january> cdd util
  11114.  
  11115.                       and 4DOS will change to D:\SOFTWARE\UTIL.
  11116.  
  11117.                   ##  DOS will not accept directory names longer than 64
  11118.                       characters.  You must be sure that the complete
  11119.                       directory name from the root to your deepest
  11120.                       subdirectory fits within the 64 character restriction.
  11121.  
  11122.  
  11123.  
  11124.  
  11125.  
  11126.  
  11127.  
  11128.  
  11129.  
  11130.  
  11131.  
  11132.  
  11133.  
  11134.  
  11135.  
  11136.  
  11137.  
  11138.  
  11139.  
  11140.  
  11141.  
  11142.  
  11143.  
  11144.  
  11145.  
  11146.  
  11147.  
  11148.  
  11149.  
  11150.  
  11151.  
  11152.  
  11153.  
  11154.  
  11155.  
  11156.  
  11157.  
  11158.           ___________________________________________________________________
  11159.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  188
  11160.  
  11161.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CHCP
  11162.           ___________________________________________________________________
  11163.  
  11164.  
  11165.           CHCP                                                   (Compatible)
  11166.  
  11167.           Purpose:    Display or change the current system code page.
  11168.  
  11169.           Format:     CHCP [n]
  11170.  
  11171.                       n: A system code page number.
  11172.  
  11173.           ## Usage:        Code page switching allows you to select
  11174.                       different character sets for language support.  To use
  11175.                       code page switching, you must have an EGA or VGA
  11176.                       display and MS-DOS or PC-DOS 3.3 or above.
  11177.  
  11178.                       If you enter CHCP without a number, the current code
  11179.                       page is displayed.
  11180.  
  11181.                            c:\> chcp
  11182.                            Active code page: 437
  11183.  
  11184.                       If you enter CHCP plus a code page number, the system
  11185.                       code page is changed.  For example, to set the code
  11186.                       page to multilingual:
  11187.  
  11188.                            c:\> chcp 850
  11189.  
  11190.                       Before using CHCP, you must first load the device
  11191.                       drivers (in CONFIG.SYS); make sure the information file
  11192.                       (COUNTRY.SYS) is available; load national language
  11193.                       support (using the NLSFUNC command); and prepare the
  11194.                       specified code page for the devices (using the MODE
  11195.                       command with the CODEPAGE PREPARE option).
  11196.  
  11197.                       CHCP accepts one of the two prepared system code pages.
  11198.                       An error message is displayed if a code page is
  11199.                       selected that has not been prepared for the system.
  11200.  
  11201.                       See your DOS manual for more information on CHCP.
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.  
  11208.  
  11209.  
  11210.  
  11211.  
  11212.  
  11213.  
  11214.  
  11215.           ___________________________________________________________________
  11216.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  189
  11217.  
  11218.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CLS
  11219.           ___________________________________________________________________
  11220.  
  11221.  
  11222.           CLS                                                      (Enhanced)
  11223.  
  11224.           Purpose:    Clear the video display and move the cursor to the
  11225.                       upper left corner;  optionally change the default
  11226.                       display and border colors.
  11227.  
  11228.           Format:     CLS [[BRIght] [BLInk] fg ON bg] [BORder bc]
  11229.  
  11230.                       fg:  The new foreground color
  11231.                       bg:  The new background color
  11232.                       bc:  The new border color
  11233.  
  11234.                       The available colors are:
  11235.  
  11236.                         Black         Blue          Green         Red
  11237.                         Magenta       Cyan          Yellow        White
  11238.  
  11239.                       See also: COLOR.
  11240.  
  11241.           Usage:      CLS can be used to clear the screen without changing
  11242.                       colors, or to clear the screen and change the screen
  11243.                       colors simultaneously.  These three examples show how
  11244.                       to clear the screen to the default colors, to bright
  11245.                       white letters on a blue background, and to bright
  11246.                       yellow letters on a magenta background with a blue
  11247.                       border:
  11248.  
  11249.                            c:\> cls
  11250.                            c:\> cls bright white on blue
  11251.                            c:\> cls bri yel on mag bor blu
  11252.  
  11253.                       As shown in the last example, color names plus the
  11254.                       words BRIGHT, BLINK, and BORDER may be shortened to the
  11255.                       first 3 letters.
  11256.  
  11257.                       If you use BRIGHT and/or BLINK, 4DOS will apply the
  11258.                       appropriate attribute to the foreground characters (PC
  11259.                       displays do not allow a bright or blinking background).
  11260.  
  11261.                       CLS is often used in batch files to clear the screen
  11262.                       before displaying text.
  11263.  
  11264.                   ##  If ANSI.SYS or a compatible driver is not loaded, the
  11265.                       colors will not be "sticky" -- you may lose them after
  11266.                       you run an application.  If 4DOS thinks you have an
  11267.                       ANSI driver loaded, it first tries an ANSI clear
  11268.                       screen.  If that doesn't work, 4DOS will call the BIOS
  11269.                       to clear the screen.  You can force 4DOS to recognize
  11270.  
  11271.  
  11272.           ___________________________________________________________________
  11273.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  190
  11274.  
  11275.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CLS
  11276.           ___________________________________________________________________
  11277.  
  11278.  
  11279.                       the ANSI state with the SETDOS /A option (see page 294)
  11280.                       or the ANSI directive in 4DOS.INI (see page 127).
  11281.  
  11282.                       If your display accommodates more than 25 rows by 80
  11283.                       columns and CLS doesn't clear the whole screen, your
  11284.                       ANSI driver probably does not support the large display
  11285.                       size properly.
  11286.  
  11287.  
  11288.  
  11289.  
  11290.  
  11291.  
  11292.  
  11293.  
  11294.  
  11295.  
  11296.  
  11297.  
  11298.  
  11299.  
  11300.  
  11301.  
  11302.  
  11303.  
  11304.  
  11305.  
  11306.  
  11307.  
  11308.  
  11309.  
  11310.  
  11311.  
  11312.  
  11313.  
  11314.  
  11315.  
  11316.  
  11317.  
  11318.  
  11319.  
  11320.  
  11321.  
  11322.  
  11323.  
  11324.  
  11325.  
  11326.  
  11327.  
  11328.  
  11329.           ___________________________________________________________________
  11330.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  191
  11331.  
  11332.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COLOR
  11333.           ___________________________________________________________________
  11334.  
  11335.  
  11336.           COLOR                                                         (New)
  11337.  
  11338.           Purpose:    Change the default display colors.
  11339.  
  11340.           Format:     COLOR [BRIght] [BLInk] fg ON bg [BORder bc]
  11341.  
  11342.                       fg:  The new foreground color
  11343.                       bg:  The new background color
  11344.                       bc:  The new border color
  11345.  
  11346.                       The available colors are:
  11347.  
  11348.                         Black         Blue          Green         Red
  11349.                         Magenta       Cyan          Yellow        White
  11350.  
  11351.                       See also: CLS.
  11352.  
  11353.           Usage:      COLOR is normally used in batch files before displaying
  11354.                       text.  To set screen colors to bright white on blue,
  11355.                       you can use either of these commands:
  11356.  
  11357.                            c:\> color bright white on blue
  11358.                            c:\> color bri whi on blu
  11359.  
  11360.                       As the examples show, you may shorten color names plus
  11361.                       the words BRIGHT, BLINK, and BORDER to the first 3
  11362.                       letters.
  11363.  
  11364.                       If you have an ANSI driver (such as ANSI.SYS)
  11365.                       installed, COLOR will not change anything on the
  11366.                       screen.  It will only set the default colors for
  11367.                       subsequent screen displays.
  11368.  
  11369.                       If you are not using an ANSI driver, COLOR will change
  11370.                       the display colors of every character on the screen.
  11371.                       However, the colors will not be "sticky" -- you may
  11372.                       lose them after you run an application.
  11373.  
  11374.                   ##  If you see odd characters like "[44;37m" when you try
  11375.                       to set the screen colors, 4DOS probably thinks you have
  11376.                       an ANSI driver loaded when you don't.  Use SETDOS /A2,
  11377.                       or ANSI = No in 4DOS.INI, to tell 4DOS you have no ANSI
  11378.                       driver.
  11379.  
  11380.  
  11381.  
  11382.  
  11383.  
  11384.  
  11385.  
  11386.           ___________________________________________________________________
  11387.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  192
  11388.  
  11389.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11390.           ___________________________________________________________________
  11391.  
  11392.  
  11393.           COPY                                                     (Enhanced)
  11394.  
  11395.           Purpose:    Copy data between disks, directories, files, or
  11396.                       physical hardware devices (such as your printer or
  11397.                       serial port).
  11398.  
  11399.           Format:     COPY [/C /H /M /N/ /P /Q /S /R /U /V] source[+] ...
  11400.                            [/A /B] destination [/A /B]
  11401.  
  11402.                       source: A file or list of files or a device to copy
  11403.                       from.
  11404.                       destination: A file, directory, or device to copy to.
  11405.  
  11406.                       /A(SCII)                    /P(rompt)
  11407.                       /B(inary)                   /Q(uiet)
  11408.                       /C(hanged)                  /R(eplace)
  11409.                       /H(idden)                   /S(ubdirectories)
  11410.                       /M(odified)                      /U(pdate)
  11411.                       /N(othing)                  /V(erify)
  11412.  
  11413.                       See also: ATTRIB, MOVE, and REN.
  11414.  
  11415.           Usage:      The 4DOS COPY command accepts all traditional syntax
  11416.                       and options and adds several new features.
  11417.  
  11418.                       The simplest use of COPY is to make a copy of a file,
  11419.                       like this example which makes a copy of a file called
  11420.                       file1.abc:
  11421.  
  11422.                            c:\> copy file1.abc file2.def
  11423.  
  11424.                       You can also copy a file to another drive and/or
  11425.                       directory.  The following command copies file1 to the
  11426.                       \MYDIR directory on drive E:
  11427.  
  11428.                            c:\> copy file1 e:\mydir
  11429.  
  11430.                       You can copy several files at once by using wildcards:
  11431.  
  11432.                            c:\> copy *.txt e:\mydir
  11433.  
  11434.                       (See page 71 for an explanation of how 4DOS interprets
  11435.                       the wildcard characters [*] and [?].)
  11436.  
  11437.                       4DOS also lets you copy several files at one time.  The
  11438.                       following command copies 3 files from the current
  11439.                       directory to the \MYDIR directory on drive E:
  11440.  
  11441.  
  11442.  
  11443.           ___________________________________________________________________
  11444.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  193
  11445.  
  11446.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11447.           ___________________________________________________________________
  11448.  
  11449.  
  11450.                            c:\> copy file1 file2 file3 e:\mydir
  11451.  
  11452.                       The way COPY interprets your command line depends on
  11453.                       how many arguments (file, directory, or device names)
  11454.                       are on the line, and whether the arguments are
  11455.                       separated with [+] signs or spaces.
  11456.  
  11457.                       If there is only one argument on the line, COPY assumes
  11458.                       it is the source, and uses the current drive and
  11459.                       directory as the destination.  For example, the
  11460.                       following command copies all the .DAT files on drive A
  11461.                       to the current directory on drive C:
  11462.  
  11463.                            c:\> copy a:*.dat
  11464.  
  11465.                       If there are two or more arguments on the line and [+]
  11466.                       signs are not used, then COPY assumes that the last
  11467.                       argument is the destination and copies all source files
  11468.                       to this new location.  If the destination is a drive,
  11469.                       directory, or device name then the source files are
  11470.                       copied individually to the new location.  If the
  11471.                       destination is a file name, the first source file is
  11472.                       copied to the destination, and any additional source
  11473.                       files are then appended to the new destination file.
  11474.  
  11475.                       For example, the first of these commands copies the
  11476.                       .DAT files from the current directory on drive A
  11477.                       individually to C:\MYDIR (which must already exist as a
  11478.                       directory);  the second appends all the .DAT files
  11479.                       together into one large file called C:\DATA (assuming
  11480.                       C:\DATA is not a directory):
  11481.  
  11482.                            c:>\ copy a:*.dat c:\mydir\
  11483.                            c:>\ copy a:*.dat c:\data
  11484.  
  11485.                       When you copy to a directory, if you add a backslash
  11486.                       [\] to the end of the name as shown in the first
  11487.                       example above, COPY will display an error message if
  11488.                       the name does not refer to an existing directory.  You
  11489.                       can use this feature to keep COPY from treating a
  11490.                       mistyped destination directory name as a file name and
  11491.                       attempting to append all your source files to a
  11492.                       destination file, when you really meant to copy them
  11493.                       individually to a destination directory.
  11494.  
  11495.                   ##  A plus [+] tells COPY to append two or more files to a
  11496.                       single destination file.  If you list several source
  11497.                       files separated with [+] and don't specify a
  11498.  
  11499.  
  11500.           ___________________________________________________________________
  11501.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  194
  11502.  
  11503.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11504.           ___________________________________________________________________
  11505.  
  11506.  
  11507.                       destination, COPY will use the name of the first source
  11508.                       file as the destination, and append each subsequent
  11509.                       file to the first file.  For example, the following
  11510.                       command will append the contents of MEMO2 and MEMO3 to
  11511.                       MEMO1 and leave the combined contents in the file named
  11512.                       MEMO1:
  11513.  
  11514.                            c:\> copy memo1+memo2+memo3
  11515.  
  11516.                       To append the same three files but store the result in
  11517.                       BIGMEMO:
  11518.  
  11519.                            c:\> copy memo1+memo2+memo3 bigmemo
  11520.  
  11521.                   ##  You cannot append files to a device (such as a
  11522.                       printer);  if you try to do so, COPY will ignore the
  11523.                       [+] signs and copy the files individually.  If you
  11524.                       attempt to append several source files to a destination
  11525.                       directory or disk, COPY will append the files and place
  11526.                       the copy in the new location with the same name as the
  11527.                       first source file.
  11528.  
  11529.                   ##  If your destination has wildcards in it, COPY will
  11530.                       attempt to match them with the source names.  For
  11531.                       example, this command copies the .DAT files from drive
  11532.                       A to C:\MYDIR and gives the new copies the extension
  11533.                       .DX:
  11534.  
  11535.                            c:\> copy a:*.dat c:\mydir\*.dx
  11536.  
  11537.                       This feature can give you unexpected results if you use
  11538.                       it with multiple source file names.  For example,
  11539.                       suppose that drive A contains XYZ.DAT and XYZ.TXT.  The
  11540.                       command
  11541.  
  11542.                            c:\> copy a:\*.dat a:\*.txt c:\mydir\*.dx
  11543.  
  11544.                       will copy A:XYZ.DAT to C:\MYDIR\XYZ.DX.  Then it will
  11545.                       copy A:XYZ.TXT to C:\MYDIR\XYZ.DX, overwriting the
  11546.                       first file it copied.
  11547.  
  11548.                   ##  COPY also understands include lists (see page 74), so
  11549.                       you can specify several different kinds of files in the
  11550.                       same command.  This command copies the .TXT, .DOC, and
  11551.                       .BAT files from the E:\MYDIR directory to the root
  11552.                       directory of drive A:
  11553.  
  11554.                            c:\> copy e:\mydir\*.txt;*.doc;*.bat a:\
  11555.  
  11556.  
  11557.           ___________________________________________________________________
  11558.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  195
  11559.  
  11560.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11561.           ___________________________________________________________________
  11562.  
  11563.  
  11564.                   ##  COPY does not change a file's attributes.  The
  11565.                       destination file will have the same attributes as the
  11566.                       source file.
  11567.  
  11568.           Options:    The /A(SCII) and /B(inary) options apply to the
  11569.                       preceding filename and to all subsequent filenames on
  11570.                       the command line until another /A or /B is entered.
  11571.                       The other options (/C, /H, /M, /N, /P, /Q, /R, /S, /U,
  11572.                       /V) apply to all filenames on the command line, no
  11573.                       matter where you put them.  For example, either of the
  11574.                       following commands could be used to copy a font file to
  11575.                       the printer in binary mode:
  11576.  
  11577.                            c:\> copy /b myfont.dat prn
  11578.                            c:\> copy myfont.dat /b prn
  11579.  
  11580.                       Some options do not make sense in certain contexts, in
  11581.                       which case COPY will ignore them.  For example, you
  11582.                       cannot prompt before replacing an existing file when
  11583.                       the destination is a device such as the printer --
  11584.                       there's no such thing as an "existing file" on the
  11585.                       printer.  If you use conflicting output options, like
  11586.                       /Q and /P, 4DOS will take a "conservative" approach and
  11587.                       give priority to the option which generates more
  11588.                       prompts or more information.
  11589.  
  11590.                       Options used in less common situations have been marked
  11591.                       with ## below.  Remember that the options are in
  11592.                       alphabetical order, so more basic options are
  11593.                       interspersed with those marked with## .
  11594.  
  11595.                   ##  /A(SCII):  If you use /A with a source filename, 4DOS
  11596.                       will copy the file up to, but not including, the first
  11597.                       Ctrl-Z (Control-Z or ASCII 26) character in the file.
  11598.                       If you use /A with a destination filename, 4DOS will
  11599.                       add a Ctrl-Z to the end of the file (some application
  11600.                       programs use the Ctrl-Z to mark the end of a file).
  11601.                       4DOS defaults to /A when appending files.
  11602.  
  11603.                   ##  /B(inary):  If you use /B with a source filename, 4DOS
  11604.                       will copy the entire file.  Using /B with a destination
  11605.                       filename prevents 4DOS from adding a Ctrl-Z to the end
  11606.                       of the destination file.  4DOS defaults to /B for
  11607.                       normal file copies.
  11608.  
  11609.                       /C(hanged files):  Copy files only if the destination
  11610.                       file exists and is older than the source (see also /U).
  11611.                       This option is useful for updating the files in one
  11612.  
  11613.  
  11614.           ___________________________________________________________________
  11615.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  196
  11616.  
  11617.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  COPY
  11618.           ___________________________________________________________________
  11619.  
  11620.  
  11621.                       directory from those in another without copying any
  11622.                       newly created files.
  11623.  
  11624.                   ##  /H(idden):  Copy all matching files including those
  11625.                       with the hidden and/or system attribute set (see
  11626.                       ATTRIB).
  11627.  
  11628.                       /M(odified):  Copy only those files with the archive
  11629.                       bit set (see ATTRIB), i.e. those which have been
  11630.                       modified since the last backup.  The archive bit will
  11631.                       NOT be cleared after copying.
  11632.  
  11633.                   ##  /N(othing):  Do everything except actually perform the
  11634.                       copy.  This option is most useful for testing what the
  11635.                       result of a complex COPY command will be.
  11636.  
  11637.                       /P(rompt):  Ask the user to confirm each source file by
  11638.                       pressing Y or N.  An N response will skip that
  11639.                       particular file and continue with the rest of the
  11640.                       command.
  11641.  
  11642.                       /Q(uiet):  Turn off the display of the files copied.
  11643.                       This option is most often used in batch files.
  11644.  
  11645.                       /R(eplace):  Prompt the user before overwriting an
  11646.                       existing file.
  11647.  
  11648.                       /S(ubdirectories):  Copy the subdirectory tree starting
  11649.                       with the files in the source directory plus each
  11650.                       subdirectory below that.  The destination must be a
  11651.                       directory;  if it doesn't exist, COPY will attempt to
  11652.                       create it.  COPY will also attempt to create needed
  11653.                       subdirectories on the tree below the destination,
  11654.                       including empty source directories.
  11655.  
  11656.                       /U(pdate):  Copy each source file only if it is newer
  11657.                       than a matching destination file or if a matching
  11658.                       destination file does not exist (see also /C).  This
  11659.                       option is useful for keeping one directory matched with
  11660.                       another with a minimum of copying.
  11661.  
  11662.                   ##  /V(erify):  Verify each disk write.  This is the same
  11663.                       as executing the VERIFY ON command, but is only active
  11664.                       during the COPY.  /V does not read back the file and
  11665.                       compare its contents with what was written;  it only
  11666.                       verifies that the data written to disk is physically
  11667.                       readable.
  11668.  
  11669.  
  11670.  
  11671.           ___________________________________________________________________
  11672.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  197
  11673.  
  11674.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  CTTY
  11675.           ___________________________________________________________________
  11676.  
  11677.  
  11678.           CTTY                                                   (Compatible)
  11679.  
  11680.           Purpose:    Change the default console device.
  11681.  
  11682.           Format:     CTTY device
  11683.  
  11684.                       device:  The new console device.
  11685.  
  11686.           ## Usage:   Normally, 4DOS uses the keyboard as the standard input
  11687.                       device and the display as the standard output device.
  11688.                       Together, the keyboard and display are known as the
  11689.                       console or CON.  The CTTY command allows you to
  11690.                       substitute another device that can perform standard
  11691.                       character I/O for the console.
  11692.  
  11693.                       For example to change the console to the first serial
  11694.                       port:
  11695.  
  11696.                            c:\> ctty com1
  11697.  
  11698.                       Change the console back to the standard keyboard and
  11699.                       display:
  11700.  
  11701.                            c:\> ctty con
  11702.  
  11703.                       CTTY works only for programs and commands that use
  11704.                       standard DOS input and output functions.  This includes
  11705.                       all 4DOS internal commands except DRAWBOX, DRAWHLINE,
  11706.                       DRAWVLINE, LIST, SCREEN, SCRPUT, SELECT, and VSCRPUT.
  11707.  
  11708.  
  11709.  
  11710.  
  11711.  
  11712.  
  11713.  
  11714.  
  11715.  
  11716.  
  11717.  
  11718.  
  11719.  
  11720.  
  11721.  
  11722.  
  11723.  
  11724.  
  11725.  
  11726.  
  11727.  
  11728.           ___________________________________________________________________
  11729.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  198
  11730.  
  11731.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DATE
  11732.           ___________________________________________________________________
  11733.  
  11734.  
  11735.           DATE                                                   (Compatible)
  11736.  
  11737.           Purpose:    Display and optionally change the system date.
  11738.  
  11739.           Format:     DATE [mm-dd-yy]
  11740.  
  11741.                       mm:  The month (01 - 12)
  11742.                       dd:  The day  (01 - 31)
  11743.                       yy:  The year (80 - 199 = 1980 to 2099)
  11744.  
  11745.                       See also: TIME.
  11746.  
  11747.           Usage:      If you simply type DATE without any parameters, 4DOS
  11748.                       will display the current system date and time, and
  11749.                       prompt you for a new date.  Press ENTER if you don't
  11750.                       wish to change the date.  If you type a new date, it
  11751.                       will become the current system date, which is included
  11752.                       in the directory entry of each file as it is created or
  11753.                       altered:
  11754.  
  11755.                            c:\> date
  11756.                            Mon  Sep 16, 1991  9:30:06
  11757.                            Enter new date (mm-dd-yy):
  11758.  
  11759.                       You can also enter a new system date by typing the DATE
  11760.                       command plus the new date on the command line:
  11761.  
  11762.                            c:\> date 9/16/91
  11763.  
  11764.                       You can use hyphens, slashes, or periods to separate
  11765.                       the month, day, and year entries.  A full 4-digit year
  11766.                       can be entered if you wish.
  11767.  
  11768.                       The format for the date entry depends on the country
  11769.                       code defined in the CONFIG.SYS file or by the CHCP
  11770.                       command.  The default format is U.S. (mm-dd-yy).  The
  11771.                       European format is dd-mm-yy; the Japanese is yy-mm-dd.
  11772.  
  11773.  
  11774.  
  11775.  
  11776.  
  11777.  
  11778.  
  11779.  
  11780.  
  11781.  
  11782.  
  11783.  
  11784.  
  11785.           ___________________________________________________________________
  11786.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  199
  11787.  
  11788.                           CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DEL / ERASE
  11789.           ___________________________________________________________________
  11790.  
  11791.  
  11792.           DEL / ERASE                                              (Enhanced)
  11793.  
  11794.           Purpose:    Erase one file, a group of files, or entire
  11795.                       subdirectories.
  11796.  
  11797.           Format:     DEL [/N /P /Q /S /X /Y /Z] file...
  11798.                            or
  11799.                       ERASE [/N /P /Q /S /X /Y /Z] file...
  11800.  
  11801.                       file:  The file, subdirectory, or list of files or
  11802.                       subdirectories to erase.
  11803.  
  11804.                       /N(othing)          /X (remove empty subdirectories)
  11805.                       /P(rompt)           /Y(es to all prompts)
  11806.                       /Q(uiet)            /Z(ap hidden and read-only files)
  11807.                       /S(ubdirectories)
  11808.  
  11809.           Usage:      DEL and ERASE are synonyms, you can use either one.
  11810.  
  11811.                       Use the DEL and ERASE commands with caution; the files
  11812.                       and subdirectories that you erase may be impossible to
  11813.                       recover without specialized utilities and a lot of
  11814.                       work.
  11815.  
  11816.                       To erase a single file, simply enter the file name:
  11817.  
  11818.                            c:\> del letters.txt
  11819.  
  11820.                       Like all 4DOS file processing commands, DEL accepts
  11821.                       multiple file names, wildcards (see page 71), and
  11822.                       include lists (see page 74).  For example, to erase all
  11823.                       the files in the current directory with a .BAK or .PRN
  11824.                       extension:
  11825.  
  11826.                            c:\> del *.bak *.prn
  11827.  
  11828.                       If you enter a subdirectory name, or a filename
  11829.                       composed only of wildcards (* and/or ?), DEL asks for
  11830.                       confirmation (Y or N) unless you specified the /Y
  11831.                       option.  If you respond with a Y, DEL will delete all
  11832.                       the files in that subdirectory (except hidden, system,
  11833.                       and read-only files, unless you have used the /Z
  11834.                       option).
  11835.  
  11836.           Options:##  /N(othing):  Do everything except actually delete the
  11837.                       file(s).  This is useful for testing what the result of
  11838.                       a DEL would be.
  11839.  
  11840.  
  11841.  
  11842.           ___________________________________________________________________
  11843.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  200
  11844.  
  11845.                           CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DEL / ERASE
  11846.           ___________________________________________________________________
  11847.  
  11848.  
  11849.                       /P(rompt):  Ask the user to confirm each erasure by
  11850.                       pressing Y or N.  An N response will skip that
  11851.                       particular erasure.
  11852.  
  11853.                       /Q(uiet):  Don't display filenames as they are deleted.
  11854.                       DEL will run fastest if you specify the /Q option and
  11855.                       the filename doesn't use the extended 4DOS wildcards.
  11856.  
  11857.                       /S(ubdirectories):  Delete the specified files in this
  11858.                       directory and all of its subdirectories.  This is like
  11859.                       a GLOBAL DEL, and can be used to delete all the files
  11860.                       in a subdirectory tree or even a whole disk.  It should
  11861.                       be used with caution!
  11862.  
  11863.                   ##  /X (remove empty subdirectories):  Remove empty
  11864.                       subdirectories after deleting (only useful when used
  11865.                       with /S).
  11866.  
  11867.                  ! ## /Y(es):  The reverse of /P -- it assumes a Y response
  11868.                       to everything, including deleting an entire
  11869.                       subdirectory tree.  4DOS normally prompts before
  11870.                       deleting files when the name consists only of wildcards
  11871.                       or a subdirectory name (see above); /Y overrides this
  11872.                       protection, and should be used with extreme caution!
  11873.  
  11874.                  ! ## /Z(ap):  Delete read-only, hidden, and system files as
  11875.                       well as normal files.  Files with the read-only,
  11876.                       hidden, or system attribute set are normally protected
  11877.                       from deletion; /Z overrides this protection, and should
  11878.                       be used with extreme caution.  Because EXCEPT works by
  11879.                       hiding files, /Z will override an EXCEPT command.
  11880.  
  11881.                       For example, to delete the entire subdirectory tree
  11882.                       starting with C:\UTIL, including hidden and read-only
  11883.                       files, without prompting (use this command with
  11884.                       CAUTION!):
  11885.  
  11886.                            c:\> del /s/x/y/z c:\util\
  11887.  
  11888.  
  11889.  
  11890.  
  11891.  
  11892.  
  11893.  
  11894.  
  11895.  
  11896.  
  11897.  
  11898.  
  11899.           ___________________________________________________________________
  11900.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  201
  11901.  
  11902.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DELAY
  11903.           ___________________________________________________________________
  11904.  
  11905.  
  11906.           DELAY                                                         (New)
  11907.  
  11908.           Purpose:    Pause for a specified length of time.
  11909.  
  11910.           Format:     DELAY [seconds]
  11911.  
  11912.                       seconds: the number of seconds to delay.
  11913.  
  11914.           Usage:      DELAY is useful in batch file loops while waiting for
  11915.                       something to occur.  To wait for 10 seconds:
  11916.  
  11917.                            delay 10
  11918.  
  11919.                       A simple loop could make a tone with the BEEP command
  11920.                       to get the operator's attention and then DELAY for 60
  11921.                       seconds while it waits for the user to respond.
  11922.  
  11923.                   ##  For delays shorter than one second, use the BEEP
  11924.                       command with an inaudible frequency (below 20 Hz).
  11925.  
  11926.                       You can cancel a delay by pressing Ctrl-C or Ctrl-
  11927.                       Break.
  11928.  
  11929.  
  11930.  
  11931.  
  11932.  
  11933.  
  11934.  
  11935.  
  11936.  
  11937.  
  11938.  
  11939.  
  11940.  
  11941.  
  11942.  
  11943.  
  11944.  
  11945.  
  11946.  
  11947.  
  11948.  
  11949.  
  11950.  
  11951.  
  11952.  
  11953.  
  11954.  
  11955.  
  11956.           ___________________________________________________________________
  11957.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  202
  11958.  
  11959.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DESCRIBE
  11960.           ___________________________________________________________________
  11961.  
  11962.  
  11963.           DESCRIBE                                                      (New)
  11964.  
  11965.           Purpose:    Create, modify, or delete file and subdirectory
  11966.                       descriptions.
  11967.  
  11968.           Format:     DESCRIBE file ["description"] ...
  11969.  
  11970.                       file:  The file or files to operate on.
  11971.                       "description":  The description to attach to the file.
  11972.  
  11973.           Usage:      DESCRIBE adds descriptions to DOS files and
  11974.                       subdirectories.  The descriptions are displayed by DIR
  11975.                       in single-column mode and by SELECT.  Each description
  11976.                       can be up to 40 characters long.  Descriptions let you
  11977.                       identify your files in much more meaningful ways than
  11978.                       DOS allows in an eight-character filename.
  11979.  
  11980.                       You enter a description on the command line by typing
  11981.                       the DESCRIBE command, the filename, and the description
  11982.                       in quotation marks, like this:
  11983.  
  11984.                            c:\> describe memo.txt "Memo to Bob about party"
  11985.  
  11986.                       If you don't put a description on the command line,
  11987.                       DESCRIBE will prompt you for it:
  11988.  
  11989.                            c:\> describe memo.txt
  11990.                            Describe "memo.txt" : Memo to Bob about party
  11991.  
  11992.                       If you use wildcards or multiple filenames with the
  11993.                       DESCRIBE command and don't include the description
  11994.                       itself, you will be prompted to enter a description for
  11995.                       each file.  If you do include the description on the
  11996.                       command line, all matching files will be given the same
  11997.                       description.
  11998.  
  11999.                       4DOS stores the descriptions in each directory in a
  12000.                       hidden file called DESCRIPT.ION.  Use the ATTRIB
  12001.                       command to "unhide" this file if you need to copy or
  12002.                       delete it.
  12003.  
  12004.                       The description file is modified appropriately whenever
  12005.                       you perform an internal command which affects it (such
  12006.                       as COPY, MOVE, DEL, or RENAME), but not if you use an
  12007.                       external program (such as XCOPY) or a visual shell.
  12008.  
  12009.  
  12010.  
  12011.  
  12012.  
  12013.           ___________________________________________________________________
  12014.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  203
  12015.  
  12016.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12017.           ___________________________________________________________________
  12018.  
  12019.  
  12020.           DIR                                                      (Enhanced)
  12021.  
  12022.           Purpose:    Display information about files and subdirectories.
  12023.  
  12024.           Format:     DIR [/1 /2 /4 /A[[:][-]rhsda] /B /C /D /F /J /K /L /M
  12025.                            /N /O[[:][-]deginsu] /P /S /T /U /V /W] [file...]
  12026.  
  12027.                       file:  The file, directory, or list of files or
  12028.                       directories to display.
  12029.  
  12030.                       /1  (one column)            /L(ower case)
  12031.                       /2  (two columns)           /M  (suppress footer)
  12032.                       /4  (four columns)          /N  (reset DIR options)
  12033.                       /A(ttribute select)         /O  (sort order )
  12034.                       /B(are)                     /P(ause)
  12035.                       /C(ase -- use upper case)   /S(ubdirectories)
  12036.                       /D(isable colorization)     /T  (aTtribute display)
  12037.                       /F(ull path)                /U  (sUmmary information)
  12038.                       /J(ustify names)            /V(ertical sort)
  12039.                       /K  (suppress header)       /W(ide)
  12040.  
  12041.                       See also: ATTRIB, DESCRIBE, SELECT, and SETDOS.
  12042.  
  12043.           Usage:      DIR can be used to display information about files from
  12044.                       one or more of your disk directories, in a wide range
  12045.                       of formats.  Depending on the options chosen, you can
  12046.                       display the file name, attributes, and size; the time
  12047.                       and date of the last change to the file; and the file
  12048.                       description.  You can also display information in 1, 2,
  12049.                       4, or 5 columns, sort the files several different ways,
  12050.                       use color to distinguish file types, and pause after
  12051.                       each full screen.
  12052.  
  12053.                       The various DIR displays are controlled through options
  12054.                       or switches.  The best way to learn how to use the many
  12055.                       options available with the DIR command is to
  12056.                       experiment.  You will soon know which options you want
  12057.                       to use regularly.  You can select those options
  12058.                       permanently by using the ALIAS command.  You may want
  12059.                       to mix several options.  For example, to display all
  12060.                       the files in the current directory, in 2 columns,
  12061.                       sorted vertically (down one column then down the next),
  12062.                       and with a pause at the end of each page:
  12063.  
  12064.                            c:\> dir /2/p/v
  12065.  
  12066.                       To set up this format as the default, using an alias:
  12067.  
  12068.  
  12069.  
  12070.           ___________________________________________________________________
  12071.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  204
  12072.  
  12073.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12074.           ___________________________________________________________________
  12075.  
  12076.  
  12077.                            c:\> alias dir=`*dir /2/p/v`
  12078.  
  12079.                       This example displays all the files on all directories
  12080.                       of drive C, including hidden and system files, pausing
  12081.                       after each page:
  12082.  
  12083.                            c:\> dir /s/h/p c:\
  12084.  
  12085.                       DIR allows wildcard characters (* and ?) in the
  12086.                       filename.  If you don't specify a filename, DIR
  12087.                       defaults to *.* (display all non-hidden files and
  12088.                       subdirectories in the current directory).  To display
  12089.                       all of the .WKS files in the current directory:
  12090.  
  12091.                            c:\> dir *.wks
  12092.  
  12093.                       If you link two or more filenames together with spaces,
  12094.                       DIR will display all of the files that match the first
  12095.                       name and then all of the files that match the second
  12096.                       name.  You may use a different drive and path for each
  12097.                       filename.  This example lists all of the .WKS and then
  12098.                       all of the .WK1 files in the current directory:
  12099.  
  12100.                            c:\> dir *.wks *.wk1
  12101.  
  12102.                       If you link multiple filenames with a semi-colon [;]
  12103.                       (an "include list", see page 74), DIR will display the
  12104.                       matching filenames in a single listing.  Only the first
  12105.                       filename in an include list can have a path; the other
  12106.                       files must be in the same path.  This example displays
  12107.                       the same files as the previous example, but the .WKS
  12108.                       and .WK1 files are intermixed:
  12109.  
  12110.                            c:\> dir *.wks;*.wk1
  12111.  
  12112.                       If you have an ANSI driver loaded, you can display the
  12113.                       file and subdirectory names in color by setting the
  12114.                       COLORDIR environment variable.  The format for COLORDIR
  12115.                       is:
  12116.  
  12117.                            ext ... :[BRIght][BLInk] fg [ON bg]; ...
  12118.  
  12119.                       where "ext" is a file extension (1 to 3 characters) or
  12120.                       one of the following file types:
  12121.  
  12122.                            DIRS - directories
  12123.                            RDONLY - read-only files
  12124.                            HIDDEN - hidden files
  12125.  
  12126.  
  12127.           ___________________________________________________________________
  12128.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  205
  12129.  
  12130.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12131.           ___________________________________________________________________
  12132.  
  12133.  
  12134.                            SYSTEM - system files
  12135.                            ARCHIVE - files modified since the last backup
  12136.  
  12137.                       For example, to display the .COM and .EXE files in red,
  12138.                       the .C and .ASM files in bright cyan, and the read-only
  12139.                       files in blinking green (this should be entered on one
  12140.                       line):
  12141.  
  12142.                            c:\> set colordir=com exe:red; c asm:bright cyan;
  12143.                                 rdonly:blink green
  12144.  
  12145.                       If you don't specify a background color, DIR will use
  12146.                       the current screen background color.  COLORDIR will not
  12147.                       work properly unless you have an ANSI driver loaded.
  12148.  
  12149.                       If you have COLORDIR set and attempt to redirect the
  12150.                       output of DIR to a character device, such as a serial
  12151.                       port or the printer, non-colorized file names will be
  12152.                       displayed on the device but colorized names will still
  12153.                       be displayed on the screen.  This will not occur if the
  12154.                       output of DIR is redirected to a disk file.  To avoid
  12155.                       this problem, use the /D switch to disable directory
  12156.                       colorization when redirecting the output of DIR to a
  12157.                       character device.
  12158.  
  12159.                   ##  Extended wildcards (for example "BA[KXC]" for .BAK,
  12160.                       .BAX, and .BAC files) can be used in directory color
  12161.                       specifications.  See page 71 for more information on
  12162.                       extended wildcards.
  12163.  
  12164.                   ##  When sorting file names and extensions, 4DOS normally
  12165.                       assumes that sequences of digits should be sorted
  12166.                       numerically (for example, the file DRAW2 would come
  12167.                       before DRAW03 because 2 is numerically larger than 03),
  12168.                       rather than strictly alphabetically (where DRAW2 would
  12169.                       come second because "2" is more than "0").  You can
  12170.                       defeat this behavior and force a strict alphabetic sort
  12171.                       with the /O:a option.
  12172.  
  12173.                   ##  If a country code was defined in the CONFIG.SYS file or
  12174.                       by the CHCP command, DIR will display the date in the
  12175.                       format for that country.  The default date format is
  12176.                       U.S. (mm-dd-yy).  The separator character in the file
  12177.                       time will also be affected by the country code.
  12178.  
  12179.                   ##  DIR can handle directories of any size, limited only by
  12180.                       available memory.  Each filename requires 32 bytes of
  12181.                       free base memory plus the size of the description (if
  12182.  
  12183.  
  12184.           ___________________________________________________________________
  12185.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  206
  12186.  
  12187.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12188.           ___________________________________________________________________
  12189.  
  12190.  
  12191.                       any); a system with 128K of free base memory can
  12192.                       display up to 4,000 files per directory.
  12193.  
  12194.                   ##  Options on the command line apply only to the filenames
  12195.                       which follow the option, and options at the end of the
  12196.                       line apply to the preceding filename only.  This allows
  12197.                       you to specify different options for different groups
  12198.                       of files, yet retains compatibility with the
  12199.                       traditional DIR command when a single filename is
  12200.                       specified.
  12201.  
  12202.           Options:    /1:  Single column display -- display the filename,
  12203.                       size, date, time, and description.  This is the
  12204.                       default.
  12205.  
  12206.                       /2:  Two column display -- display the filename, size,
  12207.                       date, and time.
  12208.  
  12209.                       /4:  Four column display -- display the filename and
  12210.                       size, in K (kilobytes) or M (megabytes).
  12211.  
  12212.                   ##  /A(ttributes): Display only those files that have the
  12213.                       specified attribute(s) set.  Preceding the attribute
  12214.                       character with a hyphen [-] will display those files
  12215.                       that DON'T have that attribute set.  The attributes
  12216.                       are:
  12217.  
  12218.                            R    Read-only         D    Subdirectory
  12219.                            H    Hidden            A    Archive
  12220.                            S    System
  12221.  
  12222.                       If attributes are combined, all the specified
  12223.                       attributes must match for a file to be included in the
  12224.                       listing.  For example, /A:RHS will display only those
  12225.                       files with all three attributes set.  See page 178 for
  12226.                       more information on file attributes.
  12227.  
  12228.                   ##  /B(are):  Suppress the header and summary lines, and
  12229.                       display file or subdirectory names only, in a single
  12230.                       column.  This option is most useful when you want to
  12231.                       redirect a list of names to a file or another program.
  12232.  
  12233.                       /C(ase):  Display filenames in the traditional upper
  12234.                       case; also see SETDOS /U (page 294) and the UpperCase
  12235.                       directive in 4DOS.INI (page 130).
  12236.  
  12237.                   ##  /D(isable colorization):  Temporarily disable directory
  12238.                       colorization.  Required when COLORDIR is set and DIR
  12239.  
  12240.  
  12241.           ___________________________________________________________________
  12242.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  207
  12243.  
  12244.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12245.           ___________________________________________________________________
  12246.  
  12247.  
  12248.                       output is redirected to a character device like the
  12249.                       printer (e.g. PRN or LPT1) or serial port (e.g. COM1 or
  12250.                       COM2).
  12251.  
  12252.                   ##  /F(ull path):  Display each filename with its drive
  12253.                       letter and path in a single column, without other
  12254.                       information.
  12255.  
  12256.                       /J(ustify):  Justify (align) filename extensions and
  12257.                       display them in the traditional format.
  12258.  
  12259.                   ##  /K:  Suppress the header (disk and directory name)
  12260.                       display.
  12261.  
  12262.                       /L(ower case):  Display filenames in lower case; also
  12263.                       see SETDOS /U (page 294) and the UpperCase directive in
  12264.                       4DOS.INI (page 130).
  12265.  
  12266.                   ##  /M:  Suppress the footer (file and byte count total)
  12267.                       display.
  12268.  
  12269.                       /N:  Reset the DIR options to the default values.  This
  12270.                       is useful when you want to display some files in one
  12271.                       format, and then change back to the defaults for
  12272.                       another set of files.
  12273.  
  12274.                       /O(rder):  Set the sorting order.  You may use any
  12275.                       combination of the following sorting options; if
  12276.                       multiple options are used the listing will be sorted
  12277.                       with the first sort option as the primary key, the next
  12278.                       as the secondary key, and so on:
  12279.  
  12280.                            -    Reverse the sort order for the next option
  12281.                            a    Sort names and extensions in standard ASCII
  12282.                                 order, rather than sorting numerically when
  12283.                                 digits are included in the name or extension
  12284.                            d    Sort by date and time (oldest first)
  12285.                            e    Sort by extension
  12286.                            g    Group subdirectories together
  12287.                            i    Sort by the file description
  12288.                            n    Sort by filename (this is the default)
  12289.                            r    Reverse the sort order for all options
  12290.                            s    Sort by size
  12291.                            u    Unsorted
  12292.  
  12293.                       /P(ause):  Wait for a key to be pressed after each
  12294.                       screen page before continuing the display.
  12295.  
  12296.  
  12297.  
  12298.           ___________________________________________________________________
  12299.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  208
  12300.  
  12301.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIR
  12302.           ___________________________________________________________________
  12303.  
  12304.  
  12305.                       /S(ubdirectories):  Display file information from the
  12306.                       current directory and all of its subdirectories.  DIR
  12307.                       will only display headers and summaries for those
  12308.                       directories with files that match the filename(s) and
  12309.                       attributes (if /A is used) that you specify on the
  12310.                       command line.
  12311.  
  12312.                   ##  /T  (aTtributes):  Display the filenames and attributes
  12313.                       only.  The attributes are displayed in the format RHSA,
  12314.                       where:
  12315.  
  12316.                            R    Read-only
  12317.                            H    Hidden
  12318.                            S    System
  12319.                            A    Archive
  12320.  
  12321.                       /U (sUmmary information):  Only display the number of
  12322.                       files, the total file size, and the total amount of
  12323.                       disk space used.
  12324.  
  12325.                       /V(ertical sort):  Display the filenames sorted
  12326.                       vertically rather than horizontally (used with the /2,
  12327.                       /4 or /W options).
  12328.  
  12329.                       /W(ide):  Display filenames only, horizontally across
  12330.                       the screen (5 columns on an 80-character wide display).
  12331.  
  12332.  
  12333.  
  12334.  
  12335.  
  12336.  
  12337.  
  12338.  
  12339.  
  12340.  
  12341.  
  12342.  
  12343.  
  12344.  
  12345.  
  12346.  
  12347.  
  12348.  
  12349.  
  12350.  
  12351.  
  12352.  
  12353.  
  12354.  
  12355.           ___________________________________________________________________
  12356.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  209
  12357.  
  12358.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DIRS
  12359.           ___________________________________________________________________
  12360.  
  12361.  
  12362.           DIRS                                                          (New)
  12363.  
  12364.           Purpose:    Display the current directory stack.
  12365.  
  12366.           Format:     DIRS
  12367.  
  12368.                       See also: PUSHD and POPD.
  12369.  
  12370.           Usage:      The PUSHD command adds the current default drive and
  12371.                       directory to the directory stack, a list that 4DOS
  12372.                       maintains in memory.  The POPD command removes the top
  12373.                       entry of the directory stack and makes that drive and
  12374.                       directory the new default.  The DIRS command displays
  12375.                       the contents of the directory stack, with the most
  12376.                       recent entries on top (i.e., the next POPD will
  12377.                       retrieve the first entry that DIRS displays).
  12378.  
  12379.                       For example, to change directories and then display the
  12380.                       directory stack:
  12381.  
  12382.                            c:\> pushd c:\database
  12383.                            c:\database> pushd d:\wordp\memos
  12384.                            d:\wordp\memos> dirs
  12385.                            c:\database
  12386.                            c:\
  12387.  
  12388.                       The directory stack holds 255 characters, enough for
  12389.                       about 10 to 20 typical drive and directory entires.
  12390.  
  12391.  
  12392.  
  12393.  
  12394.  
  12395.  
  12396.  
  12397.  
  12398.  
  12399.  
  12400.  
  12401.  
  12402.  
  12403.  
  12404.  
  12405.  
  12406.  
  12407.  
  12408.  
  12409.  
  12410.  
  12411.  
  12412.           ___________________________________________________________________
  12413.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  210
  12414.  
  12415.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DRAWBOX
  12416.           ___________________________________________________________________
  12417.  
  12418.  
  12419.           DRAWBOX                                                       (New)
  12420.  
  12421.           Purpose:    Draw a box on the screen.
  12422.  
  12423.           Format:     DRAWBOX ulrow ulcol lrrow lrcol style [BRIght] [BLInk]
  12424.                            fg ON bg [FILl bgfill] [SHAdow]
  12425.  
  12426.                       ulrow:  Row for upper left corner
  12427.                       ulcol:  Column for upper left corner
  12428.                       lrrow:  Row for lower right corner
  12429.                       lrcol:  Column for lower right corner
  12430.                       style:  Box drawing style:
  12431.                            0    No lines (box is drawn with blanks)
  12432.                            1    Single line
  12433.                            2    Double line
  12434.                            3    Single on top and bottom, double on sides
  12435.                            4    Double on top and bottom, single on sides
  12436.                       fg:  Foreground character color
  12437.                       bg:  Background character color
  12438.                       bgfill:  Background fill color (for the inside of the
  12439.                       box)
  12440.  
  12441.                       The available colors are:
  12442.  
  12443.                         Black         Blue          Green         Red
  12444.                         Magenta       Cyan          Yellow        White
  12445.  
  12446.                       See also: DRAWHLINE and DRAWVLINE.
  12447.  
  12448.           Usage:      DRAWBOX is useful for creating attractive screen
  12449.                       displays in batch files.  DRAWBOX detects other lines
  12450.                       and boxes on the display, and creates the appropriate
  12451.                       connector characters when possible (not all types of
  12452.                       lines can be connected with the available characters).
  12453.  
  12454.                       For example, to draw a box around the entire screen
  12455.                       with bright white lines on a blue background (enter
  12456.                       this on one line):
  12457.  
  12458.                            drawbox 0 0 24 79 1 bri whi on blu fill blu
  12459.  
  12460.                       Only the first three characters of the color name and
  12461.                       the keywords BRIGHT, BLINK, FILL, and SHADOW are
  12462.                       required.
  12463.  
  12464.                       If you use SHADOW, a drop shadow is created by changing
  12465.                       the characters in the row under the box and the 2
  12466.                       columns to the right of the box to normal intensity
  12467.  
  12468.  
  12469.           ___________________________________________________________________
  12470.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  211
  12471.  
  12472.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DRAWBOX
  12473.           ___________________________________________________________________
  12474.  
  12475.  
  12476.                       text with a black background (this will make characters
  12477.                       displayed in black disappear entirely).
  12478.  
  12479.                       The row and column values are zero-based, so on a
  12480.                       standard 25 line by 80 column display, valid rows are 0
  12481.                       - 24 and valid columns are 0 - 79.
  12482.  
  12483.                       DRAWBOX checks for valid row and column values, and
  12484.                       displays a "Usage" error message if any values are out
  12485.                       of range.
  12486.  
  12487.  
  12488.  
  12489.  
  12490.  
  12491.  
  12492.  
  12493.  
  12494.  
  12495.  
  12496.  
  12497.  
  12498.  
  12499.  
  12500.  
  12501.  
  12502.  
  12503.  
  12504.  
  12505.  
  12506.  
  12507.  
  12508.  
  12509.  
  12510.  
  12511.  
  12512.  
  12513.  
  12514.  
  12515.  
  12516.  
  12517.  
  12518.  
  12519.  
  12520.  
  12521.  
  12522.  
  12523.  
  12524.  
  12525.  
  12526.           ___________________________________________________________________
  12527.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  212
  12528.  
  12529.                             CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DRAWHLINE
  12530.           ___________________________________________________________________
  12531.  
  12532.  
  12533.           DRAWHLINE                                                     (New)
  12534.  
  12535.           Purpose:    Draw a horizontal line on the screen.
  12536.  
  12537.           Format:     DRAWHLINE row column len style [BRIght] [BLInk]
  12538.                            fg ON bg
  12539.  
  12540.                       row:  Starting row
  12541.                       column:  Starting column
  12542.                       len:  Length of line
  12543.                       style:  Line drawing style:
  12544.                            1    Single line
  12545.                            2    Double line
  12546.                       fg:  Foreground character color
  12547.                       bg:  Background character color
  12548.  
  12549.                       The available colors are:
  12550.  
  12551.                         Black         Blue          Green         Red
  12552.                         Magenta       Cyan          Yellow        White
  12553.  
  12554.                       See also: DRAWBOX and DRAWVLINE.
  12555.  
  12556.           Usage:      DRAWHLINE is useful for creating attractive screen
  12557.                       displays in batch files.  It detects other lines and
  12558.                       boxes on the display, and creates the appropriate
  12559.                       connector characters when possible (not all types of
  12560.                       lines can be connected with the available characters).
  12561.  
  12562.                       For example, the following command draws a double line
  12563.                       along the top row of the display with green characters
  12564.                       on a blue background:
  12565.  
  12566.                            drawhline 0 0 80 2 green on blue
  12567.  
  12568.                       Only the first three characters of the color name and
  12569.                       the attributes BRIGHT and BLINK are required.
  12570.  
  12571.                       The row and column values are zero-based, so on a
  12572.                       standard 25 line by 80 column display, valid rows are 0
  12573.                       - 24 and valid columns are 0 - 79.
  12574.  
  12575.                       DRAWHLINE checks for a valid row and column, and
  12576.                       displays a "Usage" error message if either value is out
  12577.                       of range.
  12578.  
  12579.  
  12580.  
  12581.  
  12582.  
  12583.           ___________________________________________________________________
  12584.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  213
  12585.  
  12586.                             CHAPTER 8 / COMMAND REFERENCE GUIDE  /  DRAWVLINE
  12587.           ___________________________________________________________________
  12588.  
  12589.  
  12590.           DRAWVLINE                                                     (New)
  12591.  
  12592.           Purpose:    Draw a vertical line on the screen.
  12593.  
  12594.           Format:     DRAWVLINE row column len style [BRIght][BLInk]
  12595.                            fg ON bg
  12596.  
  12597.                       row:  Starting row
  12598.                       column:  Starting column
  12599.                       len:  Length of line
  12600.                       style:  Line drawing style:
  12601.                            1    Single line
  12602.                            2    Double line
  12603.                       fg:  Foreground character color
  12604.                       bg:  Background character color
  12605.  
  12606.                       The available colors are:
  12607.  
  12608.                         Black         Blue          Green         Red
  12609.                         Magenta       Cyan          Yellow        White
  12610.  
  12611.                       See also: DRAWBOX and DRAWHLINE.
  12612.  
  12613.           Usage:      DRAWVLINE is useful for creating attractive screen
  12614.                       displays in batch files.  It detects other lines and
  12615.                       boxes on the display, and creates the appropriate
  12616.                       connector characters when possible (not all types of
  12617.                       lines can be connected with the available characters).
  12618.  
  12619.                       For example, to draw a double width line along the left
  12620.                       margin of the display with bright red characters on a
  12621.                       black background:
  12622.  
  12623.                            drawvline 0 0 25 2 bright red on black
  12624.  
  12625.                       Only the first three characters of the color name and
  12626.                       the attributes BRIGHT and BLINK are required.
  12627.  
  12628.                       The row and column values are zero-based, so on a
  12629.                       standard 25 line by 80 column display, valid rows are 0
  12630.                       - 24 and valid columns are 0 - 79.
  12631.  
  12632.                       DRAWVLINE checks for a valid row and column, and
  12633.                       displays a "Usage" error message if either value is out
  12634.                       of range.
  12635.  
  12636.  
  12637.  
  12638.  
  12639.  
  12640.           ___________________________________________________________________
  12641.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  214
  12642.  
  12643.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ECHO
  12644.           ___________________________________________________________________
  12645.  
  12646.  
  12647.           ECHO                                                     (Enhanced)
  12648.  
  12649.           Purpose:    Display a message, enable or disable batch file or
  12650.                       command line echoing, or display the echo status.
  12651.  
  12652.           Format:     ECHO [ON | OFF | message]
  12653.  
  12654.                       message:  Text to display.
  12655.  
  12656.                       See also: ECHOS, SCREEN, SCRPUT, SETDOS and TEXT.
  12657.  
  12658.           Usage:      4DOS has a separate echo capability for batch files and
  12659.                       for the command line.
  12660.  
  12661.                       In a batch file, if you turn ECHO on, each line of the
  12662.                       file is displayed before it is executed.  If you turn
  12663.                       ECHO off, each line is executed without being
  12664.                       displayed.  ECHO can also be used in a batch file to
  12665.                       display a message on the screen.  Regardless of the
  12666.                       ECHO state, a batch file line that begins with the [@]
  12667.                       character will not be displayed.  To turn off batch
  12668.                       file echoing, without displaying the ECHO command, use
  12669.                       this line:
  12670.  
  12671.                            @echo off
  12672.  
  12673.                       ECHO commands in a batch file will send messages to the
  12674.                       screen while the batch file executes, even if ECHO is
  12675.                       set OFF.  For example, this line will display a message
  12676.                       in a batch file:
  12677.  
  12678.                            echo Processing your print files...
  12679.  
  12680.                       If you want to echo a blank line from within a batch
  12681.                       file, enter:
  12682.  
  12683.                            echo.
  12684.  
  12685.                       You cannot use the command separator character [^] or
  12686.                       the 4DOS redirection symbols (| > <) in an ECHO
  12687.                       message, unless you enclose them in quotes or precede
  12688.                       them with the escape character (see page 93).
  12689.  
  12690.                       4DOS defaults to ECHO ON in batch files.  The current
  12691.                       ECHO state is inherited by called batch files.  You can
  12692.                       change the default setting to ECHO OFF with the SETDOS
  12693.                       /V0 command or the BatchEcho directive in 4DOS.INI (see
  12694.                       page 127).
  12695.  
  12696.  
  12697.           ___________________________________________________________________
  12698.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  215
  12699.  
  12700.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ECHO
  12701.           ___________________________________________________________________
  12702.  
  12703.  
  12704.                       If you turn the command line ECHO on, 4DOS will display
  12705.                       each command before it is executed.  This will let you
  12706.                       see the command line after 4DOS has expanded all
  12707.                       aliases and variables.  The command line ECHO is most
  12708.                       useful when you are learning how to use the advanced
  12709.                       features of 4DOS.  This example will turn command line
  12710.                       echoing on:
  12711.  
  12712.                            c:\> echo on
  12713.  
  12714.                       4DOS defaults to ECHO OFF during keyboard input.  The
  12715.                       keyboard ECHO state is independent of the batch file
  12716.                       ECHO state;  changing ECHO in a batch file has no
  12717.                       effect on the display at the command prompt, and vice
  12718.                       versa.
  12719.  
  12720.                       To see the current echo state, use the ECHO command
  12721.                       with no arguments.  This displays either the batch file
  12722.                       or command line echo state, depending on where the ECHO
  12723.                       command is performed.
  12724.  
  12725.  
  12726.  
  12727.  
  12728.  
  12729.  
  12730.  
  12731.  
  12732.  
  12733.  
  12734.  
  12735.  
  12736.  
  12737.  
  12738.  
  12739.  
  12740.  
  12741.  
  12742.  
  12743.  
  12744.  
  12745.  
  12746.  
  12747.  
  12748.  
  12749.  
  12750.  
  12751.  
  12752.  
  12753.  
  12754.           ___________________________________________________________________
  12755.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  216
  12756.  
  12757.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ECHOS
  12758.           ___________________________________________________________________
  12759.  
  12760.  
  12761.           ECHOS                                                         (New)
  12762.  
  12763.           Purpose:    Display a message without a trailing carriage return
  12764.                       and line feed.
  12765.  
  12766.           Format:     ECHOS message
  12767.  
  12768.                       See also: ECHO, SCREEN, SCRPUT, TEXT, and VSCRPUT.
  12769.  
  12770.           Usage:      ECHOS is useful for outputting text when you don't want
  12771.                       4DOS to add a carriage return / linefeed pair.  For
  12772.                       example, you can use ECHOS when you need to redirect
  12773.                       control sequences to your printer (the "^X" represents
  12774.                       the 4DOS escape character, which is normally Ctrl-X):
  12775.  
  12776.                            c:\> echos ^XeP > lpt1:
  12777.  
  12778.                       You cannot use the command separator character [^] or
  12779.                       the 4DOS redirection symbols (|><) in an ECHOS message,
  12780.                       unless you enclose them in quotes or preceded them with
  12781.                       the escape character (see page 93).
  12782.  
  12783.  
  12784.  
  12785.  
  12786.  
  12787.  
  12788.  
  12789.  
  12790.  
  12791.  
  12792.  
  12793.  
  12794.  
  12795.  
  12796.  
  12797.  
  12798.  
  12799.  
  12800.  
  12801.  
  12802.  
  12803.  
  12804.  
  12805.  
  12806.  
  12807.  
  12808.  
  12809.  
  12810.  
  12811.           ___________________________________________________________________
  12812.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  217
  12813.  
  12814.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ENDLOCAL
  12815.           ___________________________________________________________________
  12816.  
  12817.  
  12818.           ENDLOCAL                                                      (New)
  12819.  
  12820.           Purpose:    Restore the saved disk drive, directory, environment,
  12821.                       and alias list.
  12822.  
  12823.           Format:     ENDLOCAL
  12824.  
  12825.                       See also: SETLOCAL.
  12826.  
  12827.           ## Usage:   The SETLOCAL command in a batch file saves the current
  12828.                       disk drive, default directory, all environment
  12829.                       variables, and the alias list.  ENDLOCAL restores
  12830.                       everything that was saved by the previous SETLOCAL
  12831.                       command.
  12832.  
  12833.                       For example, this batch file fragment saves the drive,
  12834.                       current working directory, and environment variables,
  12835.                       changes the drive and directory, sets some environment
  12836.                       variables, runs the program TEST1, and then restores
  12837.                       the original values:
  12838.  
  12839.                            setlocal
  12840.                            cdd d:\test
  12841.                            set path=c:\;c:\dos;c:\util
  12842.                            set lib=d:\lib
  12843.                            test1
  12844.                            endlocal
  12845.  
  12846.                       SETLOCAL and ENDLOCAL can only be used in batch files,
  12847.                       not in aliases or from the command line.
  12848.  
  12849.  
  12850.  
  12851.  
  12852.  
  12853.  
  12854.  
  12855.  
  12856.  
  12857.  
  12858.  
  12859.  
  12860.  
  12861.  
  12862.  
  12863.  
  12864.  
  12865.  
  12866.  
  12867.  
  12868.           ___________________________________________________________________
  12869.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  218
  12870.  
  12871.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  ESET
  12872.           ___________________________________________________________________
  12873.  
  12874.  
  12875.           ESET                                                          (New)
  12876.  
  12877.           Purpose:    Edit environment variables and aliases.
  12878.  
  12879.           Format:     ESET [/M] variable name...
  12880.  
  12881.                       variable name:  The name of an environment variable or
  12882.                       alias to edit.
  12883.  
  12884.                       /M(aster environment)
  12885.  
  12886.                       See also: ALIAS, UNALIAS, SET, and UNSET.
  12887.  
  12888.           Usage:      ESET allows you to edit environment variables and
  12889.                       aliases using the 4DOS line editing commands (see page
  12890.                       55).
  12891.  
  12892.                       For example, to edit the executable file search path:
  12893.  
  12894.                            c:\> eset path
  12895.                            path=c:\;c:\dos;c:\util
  12896.  
  12897.                       To create and then edit an alias:
  12898.  
  12899.                            c:\> alias d dir /d/j/p
  12900.                            c:\> eset d
  12901.                            d=dir /d/j/p
  12902.  
  12903.                       ESET will search for environment variables first and
  12904.                       then aliases.  If you have an environment variable and
  12905.                       an alias with the same name, ESET will only be able to
  12906.                       edit the environment variable.
  12907.  
  12908.                       4DOS limits environment variable and alias names to 80
  12909.                       characters, and their arguments to 255 characters.
  12910.  
  12911.           Option: ##  /M(aster environment): Edit an environment variable in
  12912.                       the master environment rather than the local
  12913.                       environment.  This option is only useful from a
  12914.                       secondary command shell (for example, when an
  12915.                       application has "shelled to DOS").
  12916.  
  12917.  
  12918.  
  12919.  
  12920.  
  12921.  
  12922.  
  12923.  
  12924.  
  12925.           ___________________________________________________________________
  12926.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  219
  12927.  
  12928.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  EXCEPT
  12929.           ___________________________________________________________________
  12930.  
  12931.  
  12932.           EXCEPT                                                        (New)
  12933.  
  12934.           Purpose:    Perform a command on all available files except those
  12935.                       specified.
  12936.  
  12937.           Format:     EXCEPT (file) command
  12938.  
  12939.                       file:  The file or files to exclude from the command.
  12940.                       command:  The command to execute, including all
  12941.                       appropriate arguments and switches.
  12942.  
  12943.                       See also: ATTRIB.
  12944.  
  12945.           Usage:      EXCEPT provides a means of executing a command on a
  12946.                       group of files and/or subdirectories, and excluding a
  12947.                       subgroup from the operation.  The command can be a 4DOS
  12948.                       internal command or alias, an external command, or a
  12949.                       batch file.
  12950.  
  12951.                       You may use wildcards to specify the files to exclude
  12952.                       from the command.  The first example erases all the
  12953.                       files in the current directory except those beginning
  12954.                       with MEMO and those ending in .WKS.  The second example
  12955.                       copies all the files and subdirectories on drive C to
  12956.                       drive D except those in C:\MSC and C:\DOS, using the
  12957.                       COPY command:
  12958.  
  12959.                            c:\> except (memo*.* *.wks) erase *.*
  12960.                            c:\> except (c:\msc c:\dos) copy c:\*.* d:\ /s
  12961.  
  12962.                   ##  If you use EXCEPT with filename completion (see page
  12963.                       59) to get the filenames inside the parentheses, type a
  12964.                       space after the open parenthesis before entering a
  12965.                       partial filename or pressing Tab.  Otherwise, the
  12966.                       command line editor will treat the open parenthesis as
  12967.                       the first character of the filename to be completed.
  12968.  
  12969.                   ##  EXCEPT prevents operations on the specified file(s) by
  12970.                       setting the hidden attribute, performing the command,
  12971.                       and then clearing the hidden attribute.  If the command
  12972.                       is aborted in an unusual way, you may need to use the
  12973.                       ATTRIB command to "unhide" (-H) the file(s).
  12974.  
  12975.                   ##  EXCEPT will not work with programs or commands that
  12976.                       ignore the hidden attribute or which work explicitly
  12977.                       with hidden files, including DEL /Z and the /H (process
  12978.                       hidden files) switch available in some 4DOS file
  12979.                       processing commands.
  12980.  
  12981.  
  12982.           ___________________________________________________________________
  12983.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  220
  12984.  
  12985.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  EXCEPT
  12986.           ___________________________________________________________________
  12987.  
  12988.  
  12989.                   ##  You can use command grouping (see page 91) to execute
  12990.                       multiple commands with a single EXCEPT.  For example,
  12991.                       the following command copies all files in the current
  12992.                       directory whose extensions begin with .DA, except the
  12993.                       .DAT files, to the D:\SAVE directory, then changes the
  12994.                       first two characters of the extension of the copied
  12995.                       files to .SA.  This example should be entered on one
  12996.                       line:
  12997.  
  12998.                            c:\data> except (*.dat) (copy *.da* d:\save ^
  12999.                                     ren *.da* *.sa*)
  13000.  
  13001.                   ##  You may need to increase 4DOS's internal stack size
  13002.                       using the StackSize directive in 4DOS.INI if you use
  13003.                       extremely complex combinations of commands like EXCEPT,
  13004.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  13005.                       or use complex combinations of these commands in nested
  13006.                       batch files or nested GOSUBs.  See the StackSize
  13007.                       directive on page 137 for more information.
  13008.  
  13009.  
  13010.  
  13011.  
  13012.  
  13013.  
  13014.  
  13015.  
  13016.  
  13017.  
  13018.  
  13019.  
  13020.  
  13021.  
  13022.  
  13023.  
  13024.  
  13025.  
  13026.  
  13027.  
  13028.  
  13029.  
  13030.  
  13031.  
  13032.  
  13033.  
  13034.  
  13035.  
  13036.  
  13037.  
  13038.  
  13039.           ___________________________________________________________________
  13040.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  221
  13041.  
  13042.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  EXIT
  13043.           ___________________________________________________________________
  13044.  
  13045.  
  13046.           EXIT                                                     (Enhanced)
  13047.  
  13048.           Purpose:    Return from a secondary command processor.
  13049.  
  13050.           Format:     EXIT [value]
  13051.  
  13052.                       value:  The exit code to return (0 - 255).
  13053.  
  13054.           Usage:      Some application programs will start a secondary copy
  13055.                       of the command processor to allow you to execute DOS
  13056.                       commands.  To return to the application again, type:
  13057.  
  13058.                            c:\> exit
  13059.  
  13060.                   ##  If you specify a value, EXIT will return that value to
  13061.                       the program that started 4DOS.  For example:
  13062.  
  13063.                            c:\> exit 255
  13064.  
  13065.                   ##  The value is a number you can use to inform the program
  13066.                       of some result, such as the success or failure of a
  13067.                       batch file.  This feature is most useful for systems
  13068.                       which use batch files to automate their operation, such
  13069.                       as bulletin boards, or custom application programs like
  13070.                       databases that shell to 4DOS to perform certain tasks.
  13071.  
  13072.                   ##  You cannot EXIT from the primary command processor
  13073.                       unless you are running inside an OS/2 2.0 DOS
  13074.                       compatibility box.
  13075.  
  13076.  
  13077.  
  13078.  
  13079.  
  13080.  
  13081.  
  13082.  
  13083.  
  13084.  
  13085.  
  13086.  
  13087.  
  13088.  
  13089.  
  13090.  
  13091.  
  13092.  
  13093.  
  13094.  
  13095.  
  13096.           ___________________________________________________________________
  13097.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  222
  13098.  
  13099.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  FOR
  13100.           ___________________________________________________________________
  13101.  
  13102.  
  13103.           FOR                                                      (Enhanced)
  13104.  
  13105.           Purpose:    Repeat a command for several values of a variable.
  13106.  
  13107.           Format:     FOR [/A[:][-]rhsda] %var IN ([@]set) [DO] command ...
  13108.  
  13109.                       %var:  The variable to be used in the command ("FOR
  13110.                       variable").
  13111.                       set:  A set of values for the variable.
  13112.                       command:  A command or group of commands to be executed
  13113.                       for each value of the variable.
  13114.  
  13115.                       /A(ttribute select)
  13116.  
  13117.           Usage:      4DOS begins the FOR command by creating a set.  It then
  13118.                       executes a command for every member of the set.  The
  13119.                       command can be a 4DOS internal command or alias, an
  13120.                       external command, or a batch file.
  13121.  
  13122.                       Normally, the set is a list of files specified with
  13123.                       wildcards.  For example, if you use this line in a
  13124.                       batch file:
  13125.  
  13126.                            for %x in (*.txt) do list %x
  13127.  
  13128.                       4DOS will create a list of all files in the current
  13129.                       directory with the extension .TXT.  It sets the FOR
  13130.                       variable %x equal to each of the file names in turn,
  13131.                       and executes the LIST command for each of the files.
  13132.  
  13133.                       The set can include multiple files or an include list,
  13134.                       like this:
  13135.  
  13136.                            for %x in (d:\*.txt;*.doc;*.asc) do type %x
  13137.  
  13138.                       The set can also be made up of text instead of file
  13139.                       names.  For example, to display the free space on
  13140.                       drives C:, D:, and E:, you could use:
  13141.  
  13142.                            for %drive in (c d e) do free %drive:
  13143.  
  13144.                   ##  You can also set the FOR variable equal to each line in
  13145.                       a file by placing an [@] in front of the file name.  If
  13146.                       you have a file called DRIVES.TXT that contains a list
  13147.                       of drives on your computer, one drive name per line
  13148.                       (with a ":" after each drive letter), you can print the
  13149.                       free space on each drive this way:
  13150.  
  13151.  
  13152.  
  13153.           ___________________________________________________________________
  13154.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  223
  13155.  
  13156.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  FOR
  13157.           ___________________________________________________________________
  13158.  
  13159.  
  13160.                            for %d in (@drives.txt) do free %d > prn
  13161.  
  13162.                   ##  Because the [@] is also a valid filename character, FOR
  13163.                       first checks to see if the file exists with the [@] in
  13164.                       its name (e.g., @DRIVES.TXT).  If so, the filename is
  13165.                       treated as a normal argument.  If it doesn't exist, FOR
  13166.                       uses the filename (without the [@]) as the file from
  13167.                       which to retrieve text.
  13168.  
  13169.                   ##  4DOS will accept either % or %% in front of the
  13170.                       variable name.  You can use either form whether the FOR
  13171.                       command is typed from the command line or is part of an
  13172.                       alias or batch file.  The variable name can be up to 80
  13173.                       characters long.  The word DO is optional.
  13174.  
  13175.                   ##  If you use a single-character FOR variable name 4DOS
  13176.                       will give that name priority over any environment
  13177.                       variable which starts with the same letter, in order to
  13178.                       maintain compatibility with the traditional FOR
  13179.                       command.  For example, the following command tries to
  13180.                       add a: and b: to the end of the PATH, but will not work
  13181.                       as intended:
  13182.  
  13183.                            c:\> for %p in (a: b:) do path %path;%p
  13184.  
  13185.                       The "%p" in "%path" will be interpreted as the FOR
  13186.                       variable %p followed by the text "ath", which is not
  13187.                       what was intended.  To get around this, use a different
  13188.                       letter or a longer name for the FOR variable, or use
  13189.                       square brackets around the variable name (see page 78).
  13190.  
  13191.                   ##  The following example uses FOR with variable functions
  13192.                       to delete the .BAK files for which a corresponding .TXT
  13193.                       file exists in the current directory (this should be
  13194.                       entered on one line):
  13195.  
  13196.                            c:\docs> for %file in (*.txt) do if exist
  13197.                                     %@name[%file].txt del %@name[%file].bak
  13198.  
  13199.                   ##  You can use command grouping (see page 91) to execute
  13200.                       multiple commands for each element in the list.  For
  13201.                       example, the following command copies each .WKQ file in
  13202.                       the current directory to the D:\WKSAVE directory, and
  13203.                       then changes the extension of each file in the current
  13204.                       directory to .SAV.  This example should be entered on
  13205.                       one line:
  13206.  
  13207.                            c:\text> for %file in (*.wkq) do (copy %file
  13208.  
  13209.  
  13210.           ___________________________________________________________________
  13211.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  224
  13212.  
  13213.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  FOR
  13214.           ___________________________________________________________________
  13215.  
  13216.  
  13217.                                     d:\wksave\ ^ ren %file *.sav)
  13218.  
  13219.                   ##  One unusual use of FOR is to execute a collection of
  13220.                       batch files or other commands with the same parameter.
  13221.                       For example, you might want to have three batch files
  13222.                       all operate on the same data file.  The FOR command
  13223.                       could look like this (this should all be entered on one
  13224.                       line):
  13225.  
  13226.                            c:\> for %x in (filetest fileform fileprnt)
  13227.                                 do %x datafile
  13228.  
  13229.                       4DOS will expand this to three separate commands:
  13230.  
  13231.                            filetest datafile
  13232.                            fileform datafile
  13233.                            fileprnt datafile
  13234.  
  13235.                   ##  The variable that FOR uses (the %X in the example
  13236.                       above) is created in the environment and then erased
  13237.                       when the FOR command is done.  Because of this, you
  13238.                       must be careful not to use the name of one of your
  13239.                       environment variables as a FOR variable.  For example,
  13240.                       a command that begins
  13241.  
  13242.                            c:\> for %path in (...
  13243.  
  13244.                       will write over your current path setting and then
  13245.                       erase the path variable completely.
  13246.  
  13247.                   ##  FOR statements can be nested.  The permissible nesting
  13248.                       level depends on the amount of free space in 4DOS's
  13249.                       internal stack.
  13250.  
  13251.                   ##  You may need to increase 4DOS's internal stack size
  13252.                       using the StackSize directive in 4DOS.INI if you use
  13253.                       extremely complex combinations of commands like EXCEPT,
  13254.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  13255.                       or use complex combinations of these commands in nested
  13256.                       batch files or nested GOSUBs.  See the StackSize
  13257.                       directive on page 137 for more information.
  13258.  
  13259.           Options: ## /A(ttributes): Process only those files that have the
  13260.                       specified attribute(s).  /A will be used only when
  13261.                       processing wildcard file names in the set.  It will be
  13262.                       ignored for filenames without wildcards or other items
  13263.                       in the set.  Preceding the attribute character with a
  13264.  
  13265.  
  13266.  
  13267.           ___________________________________________________________________
  13268.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  225
  13269.  
  13270.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  FOR
  13271.           ___________________________________________________________________
  13272.  
  13273.  
  13274.                       hyphen [-] will process those files that DON'T have
  13275.                       that attribute set.  The attributes are:
  13276.  
  13277.                            R    Read-only         D    Subdirectory
  13278.                            H    Hidden            A    Archive
  13279.                            S    System
  13280.  
  13281.                       For example, to process only those files with the
  13282.                       archive attribute:
  13283.  
  13284.                            for /a:a %%f in (*.*) echo %%f needs a backup!
  13285.  
  13286.  
  13287.  
  13288.  
  13289.  
  13290.  
  13291.  
  13292.  
  13293.  
  13294.  
  13295.  
  13296.  
  13297.  
  13298.  
  13299.  
  13300.  
  13301.  
  13302.  
  13303.  
  13304.  
  13305.  
  13306.  
  13307.  
  13308.  
  13309.  
  13310.  
  13311.  
  13312.  
  13313.  
  13314.  
  13315.  
  13316.  
  13317.  
  13318.  
  13319.  
  13320.  
  13321.  
  13322.  
  13323.  
  13324.           ___________________________________________________________________
  13325.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  226
  13326.  
  13327.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  FREE
  13328.           ___________________________________________________________________
  13329.  
  13330.  
  13331.           FREE                                                          (New)
  13332.  
  13333.           Purpose:    Display the total disk space, total bytes used, and
  13334.                       total bytes free on the specified (or default)
  13335.                       drive(s).
  13336.  
  13337.           Format:     FREE [drive: ...]
  13338.  
  13339.                       drive:  One or more drives to include in the report.
  13340.  
  13341.                       See also: MEMORY.
  13342.  
  13343.           Usage:      FREE provides the same disk information as the external
  13344.                       DOS command CHKDSK, but without the wait, since it does
  13345.                       not check the integrity of the file and directory
  13346.                       structure of the disk.
  13347.  
  13348.                       A colon [:] is required after each drive letter.  This
  13349.                       example displays the status of drives A and C:
  13350.  
  13351.                            c:\> free a: c:
  13352.                             Volume in drive A: is unlabeled
  13353.                              1,213,952 bytes total disk space
  13354.                              1,115,136 bytes used
  13355.                                 98,816 bytes free
  13356.                             Volume in drive C: is DEVELOPMENT
  13357.                             42,496,000 bytes total disk space
  13358.                             36,851,712 bytes used
  13359.                              5,644,288 bytes free
  13360.  
  13361.                       If you are using DOS 4.0 or later, the disk serial
  13362.                       number will appear after the drive label or name.
  13363.  
  13364.                       Some networks with large server disk drives (256 MB or
  13365.                       more) may report disk space values that are too small
  13366.                       when FREE is used.  If this occurs, it is because the
  13367.                       network software does not provide a way to return
  13368.                       larger values to 4DOS.
  13369.  
  13370.  
  13371.  
  13372.  
  13373.  
  13374.  
  13375.  
  13376.  
  13377.  
  13378.  
  13379.  
  13380.  
  13381.           ___________________________________________________________________
  13382.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  227
  13383.  
  13384.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GLOBAL
  13385.           ___________________________________________________________________
  13386.  
  13387.  
  13388.           GLOBAL                                                        (New)
  13389.  
  13390.           Purpose:    Execute a command in the current directory and its
  13391.                       subdirectories.
  13392.  
  13393.           Format:     GLOBAL [/H /I /Q] command
  13394.  
  13395.                       command:  The command to execute, including arguments
  13396.                       and switches.
  13397.  
  13398.                       /H(idden directories)            /Q(uiet)
  13399.                       /I(gnore exit codes)
  13400.  
  13401.           Usage:      GLOBAL performs the command first in the current
  13402.                       directory and then in every subdirectory under the
  13403.                       current directory.  The command can be a 4DOS internal
  13404.                       command or alias, an external command, or a batch file.
  13405.  
  13406.                       The first example erases all the files with a .BAK
  13407.                       extension in every directory on C.  The second example
  13408.                       copies the files in every directory on drive A to the
  13409.                       directory C:\TEMP:
  13410.  
  13411.                            c:\> global erase *.bak
  13412.                            a:\> global copy *.* c:\temp
  13413.  
  13414.                   ##  You can use command grouping (see page 91) to execute
  13415.                       multiple commands in each subdirectory.  For example,
  13416.                       the following command copies each .TXT file in the
  13417.                       current directory and all of its subdirectories to
  13418.                       drive A.  It then changes the extension of each of the
  13419.                       copied files to .SAV:
  13420.  
  13421.                            c:\> global (copy *.txt a: ^ ren *.txt *.sav)
  13422.  
  13423.                   ##  You may need to increase 4DOS's internal stack size
  13424.                       using the StackSize directive in 4DOS.INI if you use
  13425.                       extremely complex combinations of commands like EXCEPT,
  13426.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  13427.                       or use complex combinations of these commands in nested
  13428.                       batch files or nested GOSUBs.  See the StackSize
  13429.                       directive on page 137 for more information.
  13430.  
  13431.           Options:##  /H(idden directories):  Forces GLOBAL to look for
  13432.                       hidden directories.  If you don't use this switch,
  13433.                       hidden directories are ignored.
  13434.  
  13435.  
  13436.  
  13437.  
  13438.           ___________________________________________________________________
  13439.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  228
  13440.  
  13441.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GLOBAL
  13442.           ___________________________________________________________________
  13443.  
  13444.  
  13445.                   ##  /I(gnore exit codes):  If this option is not specified,
  13446.                       GLOBAL will terminate if the command returns a non-zero
  13447.                       exit code.  Use /I if you want command to continue in
  13448.                       additional subdirectories even if it returns an error
  13449.                       in a previous subdirectory.
  13450.  
  13451.                       /Q(uiet):  Do not display the directory names as each
  13452.                       directory is processed.
  13453.  
  13454.  
  13455.  
  13456.  
  13457.  
  13458.  
  13459.  
  13460.  
  13461.  
  13462.  
  13463.  
  13464.  
  13465.  
  13466.  
  13467.  
  13468.  
  13469.  
  13470.  
  13471.  
  13472.  
  13473.  
  13474.  
  13475.  
  13476.  
  13477.  
  13478.  
  13479.  
  13480.  
  13481.  
  13482.  
  13483.  
  13484.  
  13485.  
  13486.  
  13487.  
  13488.  
  13489.  
  13490.  
  13491.  
  13492.  
  13493.  
  13494.  
  13495.           ___________________________________________________________________
  13496.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  229
  13497.  
  13498.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GOSUB
  13499.           ___________________________________________________________________
  13500.  
  13501.  
  13502.           GOSUB                                                         (New)
  13503.  
  13504.           Purpose:    Execute a subroutine in the current batch file.
  13505.  
  13506.           Format:     GOSUB label
  13507.  
  13508.                       label:  The batch file line label at the beginning of
  13509.                       the subroutine.
  13510.  
  13511.                       See also: CALL, GOTO and RETURN.
  13512.  
  13513.           ## Usage:   4DOS allows subroutines in batch files.  A subroutine
  13514.                       begins with a label (a colon followed by a word) and
  13515.                       ends with a RETURN command.  The subroutine is invoked
  13516.                       with a GOSUB command from another part of the batch
  13517.                       file.  The RETURN command ends a subroutine; execution
  13518.                       of the batch file will continue with the command
  13519.                       following the original GOSUB.  GOSUB allows you to
  13520.                       create subroutines within a batch file (to call other
  13521.                       batch files, see CALL.)
  13522.  
  13523.                       The subroutine must start with a label that begins with
  13524.                       a colon [:] and which appears on a line by itself.
  13525.                       4DOS ignores case differences when matching labels.
  13526.  
  13527.                       The subroutine must end with a RETURN statement.  After
  13528.                       the RETURN, 4DOS will continue processing the batch
  13529.                       file with the command following the GOSUB command.
  13530.  
  13531.                       The following batch file fragment calls a subroutine
  13532.                       which displays the directory and returns:
  13533.  
  13534.                            echo Calling a subroutine
  13535.                            gosub subr1
  13536.                            echo Returned from the subroutine
  13537.                            quit
  13538.                            :subr1
  13539.                            dir /a/w
  13540.                            return
  13541.  
  13542.                       If the label doesn't exist, the batch file is
  13543.                       terminated with the error message "Label not found."
  13544.  
  13545.                       GOSUB saves the IFF state, so IFF statements inside a
  13546.                       subroutine won't interfere with IFF statements in the
  13547.                       part of the batch file from which the subroutine was
  13548.                       called.
  13549.  
  13550.  
  13551.  
  13552.           ___________________________________________________________________
  13553.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  230
  13554.  
  13555.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GOSUB
  13556.           ___________________________________________________________________
  13557.  
  13558.  
  13559.                       Subroutines can be nested.  The permissible nesting
  13560.                       level depends on the amount of free space in 4DOS's
  13561.                       internal stack.
  13562.  
  13563.                   ##  You may need to increase 4DOS's internal stack size
  13564.                       using the StackSize directive in 4DOS.INI if you use
  13565.                       extremely complex combinations of commands like EXCEPT,
  13566.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  13567.                       or use complex combinations of these commands in nested
  13568.                       batch files or nested GOSUBs.  See the StackSize
  13569.                       directive on page 137 for more information.
  13570.  
  13571.  
  13572.  
  13573.  
  13574.  
  13575.  
  13576.  
  13577.  
  13578.  
  13579.  
  13580.  
  13581.  
  13582.  
  13583.  
  13584.  
  13585.  
  13586.  
  13587.  
  13588.  
  13589.  
  13590.  
  13591.  
  13592.  
  13593.  
  13594.  
  13595.  
  13596.  
  13597.  
  13598.  
  13599.  
  13600.  
  13601.  
  13602.  
  13603.  
  13604.  
  13605.  
  13606.  
  13607.  
  13608.  
  13609.           ___________________________________________________________________
  13610.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  231
  13611.  
  13612.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GOTO
  13613.           ___________________________________________________________________
  13614.  
  13615.  
  13616.           GOTO                                                   (Compatible)
  13617.  
  13618.           Purpose:    Branch to a specified line inside the current batch
  13619.                       file.
  13620.  
  13621.           Format:     GOTO [/I] label
  13622.  
  13623.                       label:  The batch file line label to branch to.
  13624.  
  13625.                       /I(FF continues)
  13626.  
  13627.                       See also: GOSUB.
  13628.  
  13629.           Usage:      After a GOTO command in a batch file, the next line to
  13630.                       be executed will be the one immediately after the
  13631.                       label.  The label must begin with a colon [:] and
  13632.                       appear on a line by itself.  4DOS ignores case
  13633.                       differences when matching labels.
  13634.  
  13635.                       This batch file fragment checks for the existence of
  13636.                       the file CONFIG.SYS.  If the file exists, 4DOS jumps to
  13637.                       C_EXISTS and copies all the files from the current
  13638.                       directory to the root directory on A:.  Otherwise, 4DOS
  13639.                       prints an error message and exits.
  13640.  
  13641.                            if exist config.sys goto C_EXISTS
  13642.                            echo CONFIG.SYS doesn't exist - exiting.
  13643.                            quit
  13644.                            :C_EXISTS
  13645.                            copy *.* a:\
  13646.  
  13647.                       If the label doesn't exist, the batch file is
  13648.                       terminated with the error message "Label not found."
  13649.  
  13650.                       To avoid errors in the processing of nested IFF
  13651.                       statements, if /I is not used GOTO cancels all active
  13652.                       IFF statements.  This means that a normal GOTO (without
  13653.                       /I) inside an IFF statement must branch outside all IFF
  13654.                       statements, and  may not branch to any label that is
  13655.                       between an IFF and the corresponding ENDIFF.  This
  13656.                       includes branches inside the current IFF statement.
  13657.  
  13658.           Options:##  /I(FF continues):  Prevents GOTO from cancelling IFF
  13659.                       statements.  Use this option only if you are absolutely
  13660.                       certain that your GOTO command is branching entirely
  13661.                       within the current active IFF statement, and not into
  13662.                       another IFF statement or a different IFF nesting level.
  13663.  
  13664.  
  13665.  
  13666.           ___________________________________________________________________
  13667.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  232
  13668.  
  13669.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  GOTO
  13670.           ___________________________________________________________________
  13671.  
  13672.  
  13673.                       Using /I under any other conditions will cause an error
  13674.                       later in your batch file.
  13675.  
  13676.  
  13677.  
  13678.  
  13679.  
  13680.  
  13681.  
  13682.  
  13683.  
  13684.  
  13685.  
  13686.  
  13687.  
  13688.  
  13689.  
  13690.  
  13691.  
  13692.  
  13693.  
  13694.  
  13695.  
  13696.  
  13697.  
  13698.  
  13699.  
  13700.  
  13701.  
  13702.  
  13703.  
  13704.  
  13705.  
  13706.  
  13707.  
  13708.  
  13709.  
  13710.  
  13711.  
  13712.  
  13713.  
  13714.  
  13715.  
  13716.  
  13717.  
  13718.  
  13719.  
  13720.  
  13721.  
  13722.  
  13723.           ___________________________________________________________________
  13724.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  233
  13725.  
  13726.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  HELP
  13727.           ___________________________________________________________________
  13728.  
  13729.  
  13730.           HELP                                        (New, External command)
  13731.  
  13732.           Purpose:    Display help for 4DOS and DOS commands.
  13733.  
  13734.           Format:     HELP [/M /Sn /X] [topic]
  13735.  
  13736.                       topic:  A help topic, 4DOS internal command, or DOS
  13737.                       external command.
  13738.  
  13739.                       /M(onochrome)               /X (disable mouse)
  13740.                       /Sn (set mouse speed)
  13741.  
  13742.           Usage:      HELP displays a brief description and the proper syntax
  13743.                       of both 4DOS and DOS commands.  If you simply type
  13744.  
  13745.                            c:\> help
  13746.  
  13747.                       you will see a list of all help topics.  You can select
  13748.                       a topic by using the cursor keys and then pressing
  13749.                       Enter.
  13750.  
  13751.                       If you want to avoid the opening list, use a topic or
  13752.                       command name.  For example, if you want help with the
  13753.                       4DOS COPY command, type
  13754.  
  13755.                            c:\> help copy
  13756.  
  13757.                       You can also start HELP by pressing F1 at the 4DOS
  13758.                       prompt (see page 62).
  13759.  
  13760.                       4HELP.EXE and 4DOS.HLP must be in the current directory
  13761.                       or one of the directories specified in the current PATH
  13762.                       setting.  If you keep the help files in a directory
  13763.                       which is not on your PATH, you must set the full path
  13764.                       for the help program with the HelpPath directive in
  13765.                       4DOS.INI (see page 125).  If you use the HelpPath
  13766.                       directive, the HELP command will generally respond more
  13767.                       quickly, because 4DOS won't have to search the
  13768.                       directories in your PATH setting to find the help
  13769.                       files.
  13770.  
  13771.                       The HELPCFG program included with 4DOS allows you to
  13772.                       customize the HELP colors.  To use it, just change to
  13773.                       your 4DOS directory, run HELPCFG, and follow the
  13774.                       instructions it displays.  To force HELPCFG to adjust
  13775.                       the monochrome HELP colors, even when running on a
  13776.                       color system, use the command HELPCFG /M.
  13777.  
  13778.  
  13779.  
  13780.           ___________________________________________________________________
  13781.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  234
  13782.  
  13783.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  HELP
  13784.           ___________________________________________________________________
  13785.  
  13786.  
  13787.                       If you use another program named HELP, you can use two
  13788.                       alias commands to rename the 4DOS help command as
  13789.                       4HELP:
  13790.  
  13791.                            c:\> alias 4help=`*help`
  13792.                            c:\> alias help=`c:\util\help.exe`
  13793.  
  13794.                       You can set options for HELP when your system boots
  13795.                       with the HelpOptions directive in 4DOS.INI (see page
  13796.                       125).
  13797.  
  13798.                       If you want to customize the help text (for example, to
  13799.                       add help for your own commands or aliases), you will
  13800.                       need the 4DOS Utility Disk which contains the source
  13801.                       text and hypertext compiler.
  13802.  
  13803.           Options:    /M(onochrome):  forces HELP to use a monochrome display
  13804.                       mode on color systems.  This is useful on any system
  13805.                       where HELP may be "fooled" into thinking you have a
  13806.                       color display when you don't, including portable
  13807.                       computers with LCD screens.
  13808.  
  13809.                       /Sn (Speed):  sets the HELP mouse movement speed.  /S0
  13810.                       sets the speed to one half the default speed, /S2 sets
  13811.                       it to twice the default, and /S4 sets it to four times
  13812.                       the default.  The larger values may be useful if you
  13813.                       normally use a screen size larger than the standard 80
  13814.                       x 25.
  13815.  
  13816.                       /X (disable mouse):  Completely disables the mouse in
  13817.                       HELP.  If you have a Microsoft serial or PS/2 mouse and
  13818.                       are experiencing long delays when HELP starts, you can
  13819.                       use this option to disable the mouse if you wish.  (The
  13820.                       delay is caused by the extended time required by the
  13821.                       Microsoft Mouse driver to initialize these mice.)
  13822.  
  13823.  
  13824.  
  13825.  
  13826.  
  13827.  
  13828.  
  13829.  
  13830.  
  13831.  
  13832.  
  13833.  
  13834.  
  13835.  
  13836.  
  13837.           ___________________________________________________________________
  13838.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  235
  13839.  
  13840.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  HISTORY
  13841.           ___________________________________________________________________
  13842.  
  13843.  
  13844.           HISTORY                                                       (New)
  13845.  
  13846.           Purpose:    Display, add to, clear, or read the history list.
  13847.  
  13848.           Format:     HISTORY [/A command /F /P /R filename]
  13849.  
  13850.                       /A(dd)                           /P(ause)
  13851.                       /F(ree)                     /R(ead)
  13852.  
  13853.                       See also: LOG
  13854.  
  13855.           Usage:      4DOS keeps a list of the commands you have entered on
  13856.                       the command line.  See page 56 for information on
  13857.                       command recall, which allows you to use the history
  13858.                       list to repeat or edit commands you have typed.
  13859.  
  13860.                       The HISTORY command lets you view and manipulate the
  13861.                       command history list directly.  If no parameters are
  13862.                       entered, HISTORY will display the current command
  13863.                       history list:
  13864.  
  13865.                            c:\> history
  13866.  
  13867.                       With the options explained below, you can add new
  13868.                       commands to the list without executing them, save the
  13869.                       list in a file, or read a new list from a file.
  13870.  
  13871.                       The number of commands saved in the history list
  13872.                       depends on the length of each command line.  The
  13873.                       history list size can be specified at startup from 256
  13874.                       to 8192 characters (see page 125).  The default size is
  13875.                       1024 characters.
  13876.  
  13877.                   ##  You can use the HISTORY command as an aid in writing
  13878.                       batch files.  Any time you have executed a series of
  13879.                       commands that you'd like to save as the basis for a
  13880.                       batch file, simply redirect the output of HISTORY to a
  13881.                       file:
  13882.  
  13883.                            c:\> history > newbatch
  13884.  
  13885.                       Then edit the output file to contain only the commands
  13886.                       you want in the batch file, and save it under the
  13887.                       appropriate name.  If you know you're going to use
  13888.                       HISTORY this way, you may want to use the /F switch to
  13889.                       clear the history first, so that your output file isn't
  13890.                       cluttered with too many extraneous commands.
  13891.  
  13892.  
  13893.  
  13894.           ___________________________________________________________________
  13895.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  236
  13896.  
  13897.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  HISTORY
  13898.           ___________________________________________________________________
  13899.  
  13900.  
  13901.                   ##  You can disable the history list or specify a minimum
  13902.                       command line length to save with the HistMin directive
  13903.                       in the 4DOS.INI file.
  13904.  
  13905.           Options:##  /A(dd):  Add a command to the history list.  This
  13906.                       performs the same function as the Ctrl-K key at the
  13907.                       command line (see page 56).
  13908.  
  13909.                       /F(ree):  Erase all entries in the command history
  13910.                       list.
  13911.  
  13912.                       /P(rompt):  Wait for a key after displaying each page
  13913.                       of the list.
  13914.  
  13915.                   ##  /R(ead):  Read the command history from the specified
  13916.                       file and append it to the history list currently held
  13917.                       in memory.  You can save the history list by
  13918.                       redirecting the output of HISTORY to a file.  This
  13919.                       example saves the command history to a file called
  13920.                       HISTFLE and reads it back again immediately.  If you
  13921.                       leave out the second line, 4DOS will append the
  13922.                       contents of the file to the current history list
  13923.                       instead of replacing the current history list with the
  13924.                       file copy:
  13925.  
  13926.                            c:\> history > histfile
  13927.                            c:\> history /f
  13928.                            c:\> history /r histfile
  13929.  
  13930.                       If you need to save your history at the end of each
  13931.                       day's work, you might use commands like this in your
  13932.                       AUTOEXEC.BAT file:
  13933.  
  13934.                            if exist c:\histfile history /r c:\histfile
  13935.                            alias shut*down `history > c:\histfile`
  13936.  
  13937.                       This restores the previous history list if it exists,
  13938.                       then defines an alias which will save the history
  13939.                       before shutting off the system.
  13940.  
  13941.  
  13942.  
  13943.  
  13944.  
  13945.  
  13946.  
  13947.  
  13948.  
  13949.  
  13950.  
  13951.           ___________________________________________________________________
  13952.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  237
  13953.  
  13954.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  13955.           ___________________________________________________________________
  13956.  
  13957.  
  13958.           IF                                                       (Enhanced)
  13959.  
  13960.           Purpose:    Execute a command if a condition or set of conditions
  13961.                       is true.
  13962.  
  13963.           Format:     IF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  13964.                            condition ...] command
  13965.  
  13966.                       condition:  A test to determine if the command should
  13967.                       be executed.
  13968.                       command:  The command to execute if the condition is
  13969.                       true.
  13970.  
  13971.                       See also: IFF.
  13972.  
  13973.           Usage:      IF is normally used only in aliases and batch files.
  13974.                       It is always followed by one or more conditions and
  13975.                       then a command.  4DOS first evaluates the conditions.
  13976.                       If they are true, 4DOS executes the command.
  13977.                       Otherwise, the command is ignored.  If you add a NOT
  13978.                       before a condition, the command is executed only when
  13979.                       the condition is false.
  13980.  
  13981.                       You can link conditions with .AND., .OR., or .XOR., and
  13982.                       you can nest IF statements.  The conditions can test
  13983.                       strings, numbers, the existence of a file or
  13984.                       subdirectory, the errorlevel returned from the
  13985.                       preceding external command, and the existence of alias
  13986.                       names and internal commands.
  13987.  
  13988.                       The command can be an alias, a 4DOS internal command,
  13989.                       an external command, or a batch file.  The entire IF
  13990.                       statement, including all conditions and the command,
  13991.                       must fit on one line.
  13992.  
  13993.                   ##  You can use command grouping (see page 91) to execute
  13994.                       multiple commands if the condition is true.  For
  13995.                       example, the following command tests if any .TXT files
  13996.                       exist.  If they do, they are copied to drive A: and
  13997.                       their extensions are changed to .TXO:
  13998.  
  13999.                            if exist *.txt (copy *.txt a: ^ ren *.txt *.txo)
  14000.  
  14001.                       (The IFF command provides a more structured method of
  14002.                       executing multiple commands if a condition or set of
  14003.                       conditions is true.)
  14004.  
  14005.  
  14006.  
  14007.  
  14008.           ___________________________________________________________________
  14009.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  238
  14010.  
  14011.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14012.           ___________________________________________________________________
  14013.  
  14014.  
  14015.                   ##  You may need to increase 4DOS's internal stack size
  14016.                       using the StackSize directive in 4DOS.INI if you use
  14017.                       extremely complex combinations of commands like EXCEPT,
  14018.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  14019.                       or use complex combinations of these commands in nested
  14020.                       batch files or nested GOSUBs.  See the StackSize
  14021.                       directive on page 137 for more information.
  14022.  
  14023.           Conditions: The following conditional tests are available in both
  14024.                       the IF and IFF commands.  They fit into three
  14025.                       categories: string tests, numeric tests, and system
  14026.                       tests.  The tests can use environment variables, 4DOS
  14027.                       internal-variables and variable functions (see pages 81
  14028.                       and 85), file names, and literal text and values as
  14029.                       their arguments.
  14030.  
  14031.                       If you use one of the string or numeric tests like ==
  14032.                       or GE, 4DOS decides whether to compare the values as
  14033.                       numbers or as strings by examining the first character
  14034.                       of each value.  If both values begin with a digit, 4DOS
  14035.                       performs a numeric comparison.  If either value does
  14036.                       not begin with a digit, a string comparison is done.
  14037.                       To force a string comparison, use double quotes around
  14038.                       the values you are testing.
  14039.  
  14040.                       The difference between numeric and string comparisons
  14041.                       is best explained by looking at the way values with and
  14042.                       without blanks are tested.  For example, consider
  14043.                       comparing the values 2 and 19.  Numerically, 2 is
  14044.                       smaller, but as a string it is "larger" because its
  14045.                       first digit is larger than the first digit of 19.  So
  14046.                       the first of these conditions will be true, and the
  14047.                       second will be false:
  14048.  
  14049.                            if 2 lt 19 ...
  14050.                            if "2" lt "19" ...
  14051.  
  14052.                       String Tests:
  14053.  
  14054.                         For the string tests, 4DOS ignores case differences.
  14055.                         When you compare strings, you should always enclose
  14056.                         the arguments in double quotes in order to avoid
  14057.                         syntax errors which may occur if one of the argument
  14058.                         values is empty.
  14059.  
  14060.                         string1 == string2
  14061.  
  14062.                         string1 EQ string2
  14063.  
  14064.  
  14065.           ___________________________________________________________________
  14066.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  239
  14067.  
  14068.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14069.           ___________________________________________________________________
  14070.  
  14071.  
  14072.                            If string1 is equal to string2, then the
  14073.                            condition is true.
  14074.  
  14075.                         string1 != string2
  14076.                         string1 NE string2
  14077.  
  14078.                            If string1 is not equal to string 2, then the
  14079.                            condition is true.
  14080.  
  14081.                         string1 LT string2
  14082.                            If string1 is less than string2, then the
  14083.                            condition is true.
  14084.  
  14085.                         string1 LE string2
  14086.  
  14087.                            If string1 is less than or equal to string2, then
  14088.                            the condition is true.
  14089.  
  14090.                         string1 GT string2
  14091.                            If string1 is greater than string2, then the
  14092.                            condition is true.
  14093.  
  14094.                         string1 GE string2
  14095.  
  14096.                            If string1 is greater than or equal to string2,
  14097.                            then the condition is true.
  14098.  
  14099.                         This first batch file fragment runs a program called
  14100.                         MONOPROG if a monochrome monitor is attached to the
  14101.                         system:
  14102.  
  14103.                                 if "%_monitor" == "mono" monoprog
  14104.  
  14105.                         The second batch file fragment tests for a string
  14106.                         value:
  14107.  
  14108.                                 input "Enter your selection : " %%cmd
  14109.                                 if "%cmd" == "WP" goto wordproc
  14110.                                 if "%cmd" NE "GRAPHICS" goto badentry
  14111.  
  14112.                         This example calls GO.BTM if the first two
  14113.                         characters of the file MYFILE contain the string
  14114.                         "GO" (enter this example on one line):
  14115.  
  14116.                                 if "%@substr[%@line[myfile,0],0,2]"=="GO"
  14117.                                 call go.btm
  14118.  
  14119.  
  14120.  
  14121.  
  14122.           ___________________________________________________________________
  14123.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  240
  14124.  
  14125.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14126.           ___________________________________________________________________
  14127.  
  14128.  
  14129.                       Numeric Tests:
  14130.  
  14131.                         The numeric tests available are exactly the same as
  14132.                         the string tests (==, EQ, !=, NE, LT, LE, GT, and
  14133.                         GE), but compare values as numbers instead of
  14134.                         strings.  Both values must begin with a digit or
  14135.                         4DOS will perform a string test instead.
  14136.  
  14137.                         The first example below tests whether there is more
  14138.                         than 500 KBytes of free base memory; the second
  14139.                         tests for  more than 2 MBytes of free EMS memory:
  14140.  
  14141.                               c:\> if %@dosmem[k] gt 500 echo Over 500K free
  14142.                               c:\> if %@ems[m] gt 2 echo Over 2 MB EMS free
  14143.  
  14144.                         This example shows how to implement a simple loop
  14145.                         inside a batch file.  The lines between the labels
  14146.                         :loop and :loopdone will be executed 100 times:
  14147.  
  14148.                                 set limit=100
  14149.                                 set counter=1
  14150.                                 :loop
  14151.                                 if %counter gt %limit goto loopdone
  14152.                                   rem DO SOME WORK HERE
  14153.                                   set counter=%@eval[%counter + 1]
  14154.                                   goto loop
  14155.                                 :loopdone
  14156.  
  14157.                       System Tests:
  14158.  
  14159.                         The final conditions test the system status.  You
  14160.                         can also use 4DOS pseudo-variables and variable
  14161.                         functions to test other parts of the system status.
  14162.  
  14163.                         ERRORLEVEL [condition] n
  14164.  
  14165.                            This test retrieves the exit code of the
  14166.                            preceding external program.  By convention,
  14167.                            programs return an exit code of 0 when they are
  14168.                            successful and a number between 1 and 255 to
  14169.                            indicate an error.  The condition can be any of
  14170.                            the numeric operators listed above (EQ, !=, GT,
  14171.                            etc.).  If no relational operator is specified,
  14172.                            the default is GE.  The comparison between the
  14173.                            exit code and n is done numerically.
  14174.  
  14175.  
  14176.  
  14177.  
  14178.  
  14179.           ___________________________________________________________________
  14180.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  241
  14181.  
  14182.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14183.           ___________________________________________________________________
  14184.  
  14185.  
  14186.                            Not all programs return an explicit exit code.
  14187.                            For programs which do not, the behavior of
  14188.                            ERRORLEVEL is undefined and may be erratic.
  14189.  
  14190.                         EXIST filename
  14191.  
  14192.                            If the file exists, the condition is true.  You
  14193.                            can use wildcards in the filename, in which case
  14194.                            the condition is true if any file matching the
  14195.                            wildcards exists.
  14196.  
  14197.                         ISALIAS aliasname
  14198.                            If the specified name is an alias, the condition
  14199.                            is true.
  14200.  
  14201.                         ISDIR path
  14202.  
  14203.                            If the subdirectory exists, the condition is
  14204.                            true.
  14205.  
  14206.                         ISINTERNAL command
  14207.                            If the specified command is an active, internal
  14208.                            4DOS command, the condition is true.  Commands
  14209.                            can be activated and deactivated with the SETDOS
  14210.                            /I command.
  14211.  
  14212.                         The first batch file fragment below tests for the
  14213.                         existence of A:\JAN.DOC before copying it to drive
  14214.                         C.
  14215.  
  14216.                                 if exist a:\jan.doc copy a:\jan.doc c:\
  14217.  
  14218.                         This example tests the exit code of the previous
  14219.                         program and stops batch file processing if an error
  14220.                         occurred:
  14221.  
  14222.                                 if errorlevel==0 goto success
  14223.                                 echo "External Error -- Batch File Ends!"
  14224.                                 cancel
  14225.  
  14226.                       Combining Tests:
  14227.  
  14228.                         You can negate the result of any test with NOT, and
  14229.                         combine tests of any sort with .AND., .OR., and
  14230.                         .XOR.  Test conditions are always scanned from left
  14231.                         to right -- there is no implied order of precedence,
  14232.                         as there is in some programming languages.
  14233.  
  14234.  
  14235.  
  14236.           ___________________________________________________________________
  14237.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  242
  14238.  
  14239.                                    CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IF
  14240.           ___________________________________________________________________
  14241.  
  14242.  
  14243.                         When two tests are combined with .AND., the result
  14244.                         is true if both of the individual tests are true.
  14245.                         When two tests are combined with .OR., the result is
  14246.                         true if either (or both) of the individual tests are
  14247.                         true.  When two tests are combined with .XOR., the
  14248.                         result is true only if one of the tests is true and
  14249.                         the other is false.
  14250.  
  14251.                         This example runs a program called HIGHRES if either
  14252.                         an EGA or VGA video adapter is in use:
  14253.  
  14254.                               if "%_video"=="EGA" .or. "%_video"==vga highres
  14255.  
  14256.  
  14257.  
  14258.  
  14259.  
  14260.  
  14261.  
  14262.  
  14263.  
  14264.  
  14265.  
  14266.  
  14267.  
  14268.  
  14269.  
  14270.  
  14271.  
  14272.  
  14273.  
  14274.  
  14275.  
  14276.  
  14277.  
  14278.  
  14279.  
  14280.  
  14281.  
  14282.  
  14283.  
  14284.  
  14285.  
  14286.  
  14287.  
  14288.  
  14289.  
  14290.  
  14291.  
  14292.  
  14293.           ___________________________________________________________________
  14294.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  243
  14295.  
  14296.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IFF
  14297.           ___________________________________________________________________
  14298.  
  14299.  
  14300.           IFF                                                           (New)
  14301.  
  14302.           Purpose:    Allow IF / THEN / ELSE conditional execution of
  14303.                       commands.
  14304.  
  14305.           Format:     IFF [NOT] condition [.AND. | .OR. | .XOR. [NOT]
  14306.                          condition ...] THEN ^ commands
  14307.                       [ELSEIFF condition  THEN ^ commands ] ...
  14308.                       [ELSE ^ commands ]
  14309.                       ^ ENDIFF
  14310.  
  14311.                       condition:  A test to determine if the command(s)
  14312.                       should be executed.
  14313.                       commands:  One or more commands to execute if the
  14314.                       condition(s) is true.  If you use multiple commands,
  14315.                       they must be separated by carets or be placed on
  14316.                       separate lines of a batch file.
  14317.  
  14318.                       See also: IF
  14319.  
  14320.           Usage:      IFF is similar to the IF command, except that it can
  14321.                       perform one set of commands when a condition or set of
  14322.                       conditions is true and different commands when the
  14323.                       conditions are false.
  14324.  
  14325.                       IFF can execute multiple commands when the conditions
  14326.                       are true or false; IF normally executes only one
  14327.                       command.  IFF imposes no limit on the number of
  14328.                       commands and is generally a "cleaner" and more
  14329.                       structured command than IF.
  14330.  
  14331.                       IFF is always followed by one or more conditions, which
  14332.                       4DOS evaluates.  If they are true, 4DOS executes the
  14333.                       commands that follow the word THEN.  Additional
  14334.                       conditions can be tested with ELSEIFF.  If none of
  14335.                       these conditions are true, 4DOS executes the commands
  14336.                       that follow the word ELSE.  In both cases, after the
  14337.                       selected commands are executed, processing continues
  14338.                       after the word ENDIFF.
  14339.  
  14340.                       If you add a NOT before the condition, the THEN
  14341.                       commands are executed only when the condition is false
  14342.                       and the ELSE commands are executed only when the
  14343.                       condition is true.
  14344.  
  14345.                       You can link conditions with .AND., .OR., or .XOR., and
  14346.                       you can nest IFF statements up to 15 deep.  The
  14347.                       conditions can test strings or numbers, the existence
  14348.  
  14349.  
  14350.           ___________________________________________________________________
  14351.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  244
  14352.  
  14353.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  IFF
  14354.           ___________________________________________________________________
  14355.  
  14356.  
  14357.                       of a file or subdirectory, the errorlevel returned from
  14358.                       the preceding external command, and the existence of
  14359.                       alias names and internal commands.
  14360.  
  14361.                       See the IF command for a list of the possible
  14362.                       conditions.
  14363.  
  14364.                       The commands can include any 4DOS internal command or
  14365.                       alias, external command, or batch file.
  14366.  
  14367.                       The following batch file fragment tests the monitor
  14368.                       type (monochrome or color), and sets the appropriate
  14369.                       colors and prompt (enter the "prompt" lines on one line
  14370.                       of the batch file):
  14371.  
  14372.                            iff "%_monitor" == "color" then
  14373.                              color bright white on blue ^ cls
  14374.                              prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path:
  14375.                                 $p$e[u$e[44;37m$n$g
  14376.                            else
  14377.                              prompt=$e[s$e[1;1f$e[0;7m$e[K  Path:
  14378.                                 $p$e[u$e[0m$n$g
  14379.                            endiff
  14380.  
  14381.                       The alias in this second example checks to see if the
  14382.                       argument is a subdirectory.  If so, the alias deletes
  14383.                       the subdirectory's files and removes it (enter this on
  14384.                       one line):
  14385.  
  14386.                            c:\> alias prune `iff isdir %1 then ^
  14387.                                 del /sxz %1 ^ rd %1 ^ else ^
  14388.                                 echo Not a directory!^endiff`
  14389.  
  14390.                   ##  If you do a GOTO inside an IFF, 4DOS normally assumes
  14391.                       you are jumping outside of all active IFF statements.
  14392.                       If you attempt to GOTO another part of the same IFF,
  14393.                       the middle of another IFF, or a different IFF nesting
  14394.                       level, you will eventually receive an "unknown command"
  14395.                       error on a subsequent ELSE, ELSEIFF, or ENDIFF
  14396.                       statement.  You can override this restriction with GOTO
  14397.                       /I, but do so only if you are absolutely certain that
  14398.                       your GOTO command is branching entirely within the
  14399.                       current active IFF statement.  Using /I under any other
  14400.                       conditions will cause an error later in your batch
  14401.                       file.
  14402.  
  14403.  
  14404.  
  14405.  
  14406.  
  14407.           ___________________________________________________________________
  14408.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  245
  14409.  
  14410.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  INKEY
  14411.           ___________________________________________________________________
  14412.  
  14413.  
  14414.           INKEY                                                         (New)
  14415.  
  14416.           Purpose:    Get a single keystroke from the user and store it in an
  14417.                       environment variable.
  14418.  
  14419.           Format:     INKEY [/K"keys" /Wn] [prompt] %%varname
  14420.  
  14421.                       prompt:  Optional text that is displayed as a prompt.
  14422.                       varname:  The variable that will hold the user's
  14423.                       keystroke.
  14424.  
  14425.                       /K (valid keystrokes)       /W(ait)
  14426.  
  14427.                       See also: INPUT and KEYSTACK.
  14428.  
  14429.           Usage:      INKEY optionally displays a prompt for user input.
  14430.                       Then it waits for a specified time or indefinitely for
  14431.                       a keystroke, and places the keystroke into an
  14432.                       environment variable.  It is normally used in batch
  14433.                       files and aliases to get a menu choice or other single-
  14434.                       key input from the user.  Along with the INPUT command,
  14435.                       INKEY allows great flexibility in reading user input
  14436.                       from within a batch file or alias.
  14437.  
  14438.                       If prompt text is included in an INKEY command, it is
  14439.                       displayed while INKEY waits for input.
  14440.  
  14441.                       The following batch file fragment prompts for a
  14442.                       character and stores it in the variable NUM:
  14443.  
  14444.                            inkey Enter a number from 1 to 9:  %%num
  14445.  
  14446.                       INKEY reads standard input for the keystroke, so it
  14447.                       will accept keystrokes from a redirected file or from
  14448.                       the KEYSTACK.  You can supply a list of valid
  14449.                       keystrokes with the /K option.
  14450.  
  14451.                       Standard keystrokes with ASCII values between 1 and 255
  14452.                       are stored directly in the environment variable.
  14453.                       Extended keystrokes (for example, function keys and
  14454.                       cursor keys) are stored as a string in decimal format,
  14455.                       with a leading @ (for example, the F1 key is @59).  See
  14456.                       Appendix B (page 325) for a list of the ASCII and
  14457.                       extended key codes.
  14458.  
  14459.                       If you press Ctrl-C or Ctrl-BREAK while INKEY is
  14460.                       waiting for a key, execution of an alias will be
  14461.                       terminated, and execution of a batch file will be
  14462.  
  14463.  
  14464.           ___________________________________________________________________
  14465.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  246
  14466.  
  14467.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  INKEY
  14468.           ___________________________________________________________________
  14469.  
  14470.  
  14471.                       suspended while you are asked whether to cancel the
  14472.                       batch job.
  14473.  
  14474.           Options:    /K:  Specify the permissible keystrokes.  The list of
  14475.                       valid keystrokes should be enclosed in double quotes
  14476.                       ["keys"].  For alphabetic keys the validity test is not
  14477.                       case-sensitive.  You can specify extended keys by
  14478.                       enclosing their names in square brackets (within the
  14479.                       quotes), for example:
  14480.  
  14481.                            inkey /k"ab[Alt-F10]" Enter A, B, or Alt-F10
  14482.                            %%var
  14483.  
  14484.                       If an invalid keystroke is entered 4DOS will echo the
  14485.                       keystroke if possible, beep, move the cursor back one
  14486.                       character, and wait for another keystroke.
  14487.  
  14488.                       Key names within square brackets are entered in the
  14489.                       form:
  14490.  
  14491.                            Prefix-Keyname
  14492.  
  14493.                       The key prefix is optional, and can be any one of the
  14494.                       following:
  14495.  
  14496.                         Alt        followed by A - Z, 0 - 9, F1 - F12, or
  14497.                                    Bksp
  14498.                         Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  14499.                                    Left, Right, Home, End, PgUp, PgDn, Ins,
  14500.                                    or Del
  14501.                         Shift      followed by F1 - F12 or Tab.
  14502.  
  14503.                       The possible key names are:
  14504.                         A - Z         Enter         PgDn
  14505.                         0 - 9         Up            Home
  14506.                         F1 - F12      Down          End
  14507.                         Esc           Left          Ins
  14508.                         Bksp          Right         Del
  14509.                         Tab           PgUp
  14510.  
  14511.                       All key names must be spelled as shown, and can be
  14512.                       abbreviated as long as the abbreviation is unique and
  14513.                       unambiguous.  The prefix must be separated from the key
  14514.                       name with a dash.
  14515.  
  14516.                       /W(ait):  Timeout period,  in seconds, to wait for a
  14517.                       response.  If no keystroke is entered by the end of the
  14518.                       timeout period, INKEY returns with the variable
  14519.  
  14520.  
  14521.           ___________________________________________________________________
  14522.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  247
  14523.  
  14524.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  INKEY
  14525.           ___________________________________________________________________
  14526.  
  14527.  
  14528.                       unchanged.  You can specify /W0 to return immediately
  14529.                       if there are no keys waiting in the keyboard buffer.
  14530.  
  14531.                       For example, the following batch file fragment waits up
  14532.                       to 10 seconds for a character, then tests to see if a
  14533.                       "Y" was entered:
  14534.  
  14535.                            set net=N
  14536.                            inkey /K"YN" /w10 Load the network (Y/N)?  %%net
  14537.                            iff "%net" == "Y" then
  14538.                              rem Commands to load the network go here
  14539.                            endiff
  14540.  
  14541.  
  14542.  
  14543.  
  14544.  
  14545.  
  14546.  
  14547.  
  14548.  
  14549.  
  14550.  
  14551.  
  14552.  
  14553.  
  14554.  
  14555.  
  14556.  
  14557.  
  14558.  
  14559.  
  14560.  
  14561.  
  14562.  
  14563.  
  14564.  
  14565.  
  14566.  
  14567.  
  14568.  
  14569.  
  14570.  
  14571.  
  14572.  
  14573.  
  14574.  
  14575.  
  14576.  
  14577.  
  14578.           ___________________________________________________________________
  14579.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  248
  14580.  
  14581.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  INPUT
  14582.           ___________________________________________________________________
  14583.  
  14584.  
  14585.           INPUT                                                         (New)
  14586.  
  14587.           Purpose:    Get a string from the keyboard and save it in an
  14588.                       environment variable.
  14589.  
  14590.           Format:     INPUT [/Wn] [prompt] %%varname
  14591.  
  14592.                       prompt:  Optional text that is displayed as a prompt.
  14593.                       varname:  The variable that will hold the user's input.
  14594.  
  14595.                       /W(ait)
  14596.  
  14597.                       See also: INKEY and KEYSTACK.
  14598.  
  14599.           Usage:      INPUT optionally displays a prompt for user input.
  14600.                       Then it waits for a specified time or indefinitely for
  14601.                       the user's entry.  It places any characters typed by
  14602.                       the user into an environment variable.  INPUT is
  14603.                       normally used in batch files and aliases to get multi-
  14604.                       key input from the user.  Along with the INKEY command,
  14605.                       INPUT allows great flexibility in reading user input
  14606.                       from within a batch file or alias.
  14607.  
  14608.                       If prompt text is included in an INPUT command, it is
  14609.                       displayed while INPUT waits for input.  Standard 4DOS
  14610.                       command line editing keys may be used to edit the input
  14611.                       string as it is entered.
  14612.  
  14613.                       All characters entered up to, but not including, the
  14614.                       carriage return are stored in the variable.
  14615.  
  14616.                       The following batch file fragment prompts for a string
  14617.                       and stores it in the variable FNAME:
  14618.  
  14619.                            input Enter the file name:  %%fname
  14620.  
  14621.                       INPUT reads standard input, so it will accept text from
  14622.                       a re-directed file or from the KEYSTACK.
  14623.  
  14624.           Option:     /W(ait):  Timeout period,  in seconds, to wait for a
  14625.                       response.  If no keystroke is entered by the end of the
  14626.                       timeout period, INPUT returns with the variable
  14627.                       unchanged.  If you enter a key before the timeout
  14628.                       period, INPUT will wait indefinitely for the remainder
  14629.                       of the line.  You can specify /W0 to return immediately
  14630.                       if there are no keys waiting in the keyboard buffer.
  14631.  
  14632.  
  14633.  
  14634.  
  14635.           ___________________________________________________________________
  14636.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  249
  14637.  
  14638.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  KEYSTACK
  14639.           ___________________________________________________________________
  14640.  
  14641.  
  14642.           KEYSTACK                                                      (New)
  14643.  
  14644.           Purpose:    Feed keystrokes to a program or command automatically.
  14645.  
  14646.           Format:     KEYSTACK [/Wn] ["abc"] [keyname] [!] ...
  14647.  
  14648.                       "abc":  Literal characters to be placed in the
  14649.                       Keystack.
  14650.                       keyname:  Name or code for a key to be placed in the
  14651.                       Keystack.
  14652.                       !:  Signal to clear the Keystack and the keyboard
  14653.                       buffer.
  14654.  
  14655.                       /W(ait)
  14656.  
  14657.           Usage:      KEYSTACK takes a series of keystrokes and feeds them to
  14658.                       a program or command as if they were typed at the
  14659.                       keyboard.  When the program has used all of the
  14660.                       keystrokes in the keystack buffer, it will begin to
  14661.                       read the keyboard for input, as it normally would.
  14662.  
  14663.                       KEYSTACK will only work if the memory-resident program
  14664.                       KSTACK.COM has been loaded.  KSTACK is usually loaded
  14665.                       from the AUTOEXEC.BAT file (see page 114).  It can also
  14666.                       be loaded with an INSTALL= directive in CONFIG.SYS if
  14667.                       you wish and your version of DOS supports INSTALL= (see
  14668.                       your DOS manual for details).  If KSTACK is not loaded
  14669.                       the KEYSTACK command will display an error message.  If
  14670.                       you are using a multitasking system such as DESQView or
  14671.                       Windows, see page 151 for information on loading KSTACK
  14672.                       within a window.
  14673.  
  14674.                       Characters entered within double quotes ("abc") will be
  14675.                       stored "as is" in the keyboard buffer.  The only items
  14676.                       allowed outside double quotes are key names, key codes,
  14677.                       and the /W option.
  14678.  
  14679.                       Key names are entered in the form:
  14680.  
  14681.                            [Prefix-]Keyname
  14682.  
  14683.                       The key prefix can be left out, in which case any of
  14684.                       the key names can be used except A - Z or 0 - 9.  If
  14685.                       the key prefix is used it can be any one of the
  14686.                       following:
  14687.  
  14688.                         Alt        followed by A - Z, 0 - 9, F1 - F12, or
  14689.                                    Bksp
  14690.  
  14691.  
  14692.           ___________________________________________________________________
  14693.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  250
  14694.  
  14695.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  KEYSTACK
  14696.           ___________________________________________________________________
  14697.  
  14698.  
  14699.                         Ctrl       followed by A - Z, F1 - F12, Bksp, Enter,
  14700.                                    Left, Right, Home, End, PgUp, PgDn, Ins,
  14701.                                    or Del
  14702.                         Shift      followed by F1 - F12 or Tab.
  14703.  
  14704.                       The possible key names are:
  14705.  
  14706.                         A - Z         Enter         PgDn
  14707.                         0 - 9         Up            Home
  14708.                         F1 - F12      Down          End
  14709.                         Esc           Left          Ins
  14710.                         Bksp          Right         Del
  14711.                         Tab           PgUp
  14712.  
  14713.                       All key names must be spelled as shown, and can be
  14714.                       abbreviated as long as the abbreviation is unique and
  14715.                       unambiguous.
  14716.  
  14717.                       The prefix and key name must be separated by a dash.
  14718.                       For example,
  14719.  
  14720.                            Alt-F10        This is okay
  14721.                            Alt F10        The space will cause an error
  14722.  
  14723.                       If you prefer, you can use a numeric value instead of a
  14724.                       key name.  Use the ASCII code for an ASCII, extended
  14725.                       ASCII, or control character.  Use the scan code
  14726.                       preceded by an at-sign [@] for extended key codes like
  14727.                       F1 or the cursor keys.  In general, you will find it
  14728.                       easier to use the names described above rather than key
  14729.                       numbers.  See Appendix B (page 325) for an explanation
  14730.                       and list of keyboard codes.
  14731.  
  14732.                       An exclamation mark [!] will clear all pending
  14733.                       keystrokes, both in the KEYSTACK buffer and in the
  14734.                       keyboard buffer.
  14735.  
  14736.                       For example, to start ProComm Plus and skip the opening
  14737.                       screen you could use the command:
  14738.  
  14739.                            c:\comm> keystack 32 ^ pcplus
  14740.  
  14741.                       This places a space (ASCII code 32) in the buffer, then
  14742.                       runs ProComm Plus.  When ProComm looks for a keystroke
  14743.                       to end the display of the opening screen the keystroke
  14744.                       is already in the buffer, so the opening screen is
  14745.                       removed immediately.
  14746.  
  14747.  
  14748.  
  14749.           ___________________________________________________________________
  14750.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  251
  14751.  
  14752.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  KEYSTACK
  14753.           ___________________________________________________________________
  14754.  
  14755.  
  14756.                       The KEYSTACK command must be executed before running
  14757.                       the program which is going to receive the stacked
  14758.                       keystrokes.  This places the keystrokes into the buffer
  14759.                       first, so the program can find them when it runs.
  14760.  
  14761.                       You can store a maximum of 255 characters in the
  14762.                       KEYSTACK buffer.  Each time the KEYSTACK command is
  14763.                       executed, it will clear any remaining keystrokes stored
  14764.                       by a previous KEYSTACK command.
  14765.  
  14766.                       You may need to experiment with your programs and
  14767.                       insert delays (see the /W option) to find a keystroke
  14768.                       sequence that works for any particular program.
  14769.  
  14770.                       Programs that bypass DOS and the BIOS for keyboard
  14771.                       input cannot read keystrokes entered with KEYSTACK.  If
  14772.                       you use KEYSTACK then run such a program, the
  14773.                       keystrokes will not appear in the program, but may
  14774.                       appear at the prompt when you exit the program and
  14775.                       return to 4DOS.
  14776.  
  14777.                   ##  KEYSTACK treats the number 0 as a special case; it is
  14778.                       used with programs that flush the keyboard buffer.
  14779.                       When KEYSTACK processes a key value of 0, it tells the
  14780.                       program the buffer is clear, so subsequent keystrokes
  14781.                       will be accepted normally.  Some programs will require
  14782.                       several "0"s before they will accept input; you may
  14783.                       need to experiment to determine the correct number.
  14784.  
  14785.                       For example, the following batch file starts Lotus 1-2-
  14786.                       3 and loads the file specified on the command line when
  14787.                       the batch file is invoked (the KEYSTACK command should
  14788.                       be entered on one line):
  14789.  
  14790.                            pushd c:\123
  14791.                            keystack 0 Enter 0 Enter 0 Enter 0 Enter 0 Enter
  14792.                              "/FR" 0 "%1" Enter
  14793.                            123
  14794.                            popd
  14795.  
  14796.                       The sequence of "0 Enter" pairs tells 1-2-3 that the
  14797.                       keyboard buffer is empty, then passes 1-2-3 a carriage
  14798.                       return, repeating this sequence five times.  This gets
  14799.                       1-2-3 to a point where an empty spreadsheet is
  14800.                       displayed.  The rest of the KEYSTACK line issues a File
  14801.                       Retrieve command (/FR), simulates an empty keyboard
  14802.                       buffer once more, enters the file name passed on the
  14803.  
  14804.  
  14805.  
  14806.           ___________________________________________________________________
  14807.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  252
  14808.  
  14809.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  KEYSTACK
  14810.           ___________________________________________________________________
  14811.  
  14812.  
  14813.                       batch command line (%1), and finally enters a carriage
  14814.                       return to end the file name.
  14815.  
  14816.                   ##  Here's the same command defined as an alias (enter this
  14817.                       on one line):
  14818.  
  14819.                            alias 321 `pushd c:\123 ^ keystack 0 Enter 0
  14820.                            Enter 0 Enter 0 Enter 0 Enter "/FR" 0 "%1" 13 ^
  14821.                            123 ^ popd`
  14822.  
  14823.                   ##  Some programs require both the keyboard "scan code" and
  14824.                       the ASCII value to be stacked.  To stack both codes,
  14825.                       calculate the value ((256 * scan code) + ASCII code)
  14826.                       and enter that numeric value as an argument for
  14827.                       KEYSTACK.  For example, for the Enter key, the scan
  14828.                       code is 28 and the ASCII code is 13, so to stack both
  14829.                       values use ((256 * 28) + 13) or KEYSTACK 7181.  Try
  14830.                       this approach if a "normal" KEYSTACK command does not
  14831.                       work (for example, if you use KEYSTACK 13 for the Enter
  14832.                       key and the program doesn't see the correct character).
  14833.                       To stack combined key codes you must use the numeric
  14834.                       value, not the key name (see Appendix B on page 325 for
  14835.                       keyboard codes).
  14836.  
  14837.           Options:##  /W(ait):  Delay the next keystroke in the KEYSTACK
  14838.                       buffer by a specified number of clock "ticks".  A clock
  14839.                       tick is approximately 1/18 second.  The number of clock
  14840.                       ticks to delay should be placed immediately after the
  14841.                       W, and must be between 1 and 65535 (65535 ticks is
  14842.                       about 1 hour).  You can use the /W option as many times
  14843.                       as desired and at any point in the string of keystrokes
  14844.                       except within double quotes.  Some programs may need
  14845.                       the delays provided by /W in order to receive
  14846.                       keystrokes properly from KEYSTACK.  The only way to
  14847.                       determine what delay is needed is to experiment.
  14848.                       Sometimes a combination of a delay and an "empty
  14849.                       buffer" signal (a 0) are required.  For example, to
  14850.                       start the program CADX and send it an F7, a delay of
  14851.                       one second, an indication that the keyboard buffer is
  14852.                       empty, and a carriage return:
  14853.  
  14854.                            c:\> keystack F7 /W18 0 Enter ^ cadx
  14855.  
  14856.  
  14857.  
  14858.  
  14859.  
  14860.  
  14861.  
  14862.  
  14863.           ___________________________________________________________________
  14864.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  253
  14865.  
  14866.                         CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LH / LOADHIGH
  14867.           ___________________________________________________________________
  14868.  
  14869.  
  14870.           LH / LOADHIGH                                          (Compatible)
  14871.  
  14872.           Purpose:    Load a memory resident program into an Upper Memory
  14873.                       Block (UMB).
  14874.  
  14875.           Format:     LH filename
  14876.                            or
  14877.                       LOADHIGH filename
  14878.  
  14879.                       filename:  The name of the program to load into high
  14880.                       memory.
  14881.  
  14882.           Usage:      LH and LOADHIGH are synonyms.  You can use either one.
  14883.  
  14884.                       LOADHIGH requires MS-DOS 5.0 or above.
  14885.  
  14886.                       If you load memory-resident programs into UMBs, you
  14887.                       will have more room in base memory for application
  14888.                       programs.  If your system has no UMBs, or if the
  14889.                       program is larger than the largest UMB, then LOADHIGH
  14890.                       will load the program into conventional base memory.
  14891.  
  14892.                       For example, to load the program C:\UTIL\CACHE.EXE into
  14893.                       high memory:
  14894.  
  14895.                            c:\> loadhigh c:\util\cache.exe
  14896.  
  14897.                       In addition to MS-DOS 5.0 or above, LOADHIGH requires
  14898.                       the DOS=UMB command in your CONFIG.SYS file.  It can
  14899.                       only be used to load programs into UMBs managed by MS-
  14900.                       DOS 5.0 and above.
  14901.  
  14902.                       If you use a memory manager like 386MAX or QEMM to
  14903.                       manage your UMBs, rather than the MS-DOS DOS=UMB
  14904.                       directive, then LOADHIGH will not work, and you must
  14905.                       use the equivalent command supplied with your memory
  14906.                       manager in order to load programs high.
  14907.  
  14908.  
  14909.  
  14910.  
  14911.  
  14912.  
  14913.  
  14914.  
  14915.  
  14916.  
  14917.  
  14918.  
  14919.  
  14920.           ___________________________________________________________________
  14921.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  254
  14922.  
  14923.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LIST
  14924.           ___________________________________________________________________
  14925.  
  14926.  
  14927.           LIST                                                          (New)
  14928.  
  14929.           Purpose:    Display a file, with forward and backward paging and
  14930.                       scrolling.
  14931.  
  14932.           Format:     LIST [/H /S /W] file...
  14933.  
  14934.                       file:  A file or list of files to display.
  14935.  
  14936.                       /H(igh bit off)             /W(rap)
  14937.                       /S(tandard input)
  14938.  
  14939.                       See also: TYPE.
  14940.  
  14941.           Usage:      LIST provides a much faster and more flexible way to
  14942.                       view a file than TYPE, without the overhead of loading
  14943.                       and using a text editor.
  14944.  
  14945.                       LIST is normally used for displaying ASCII text files.
  14946.                       Most other files contain non-alphabetic characters and
  14947.                       may be unreadable.
  14948.  
  14949.                       For example, to display a file called MEMO.DOC:
  14950.  
  14951.                            c:\> list memo.doc
  14952.  
  14953.                       LIST uses the cursor pad to scroll through the file.
  14954.                       The following keys have special meanings:
  14955.  
  14956.                            Home              Display the first page of the
  14957.                                              file.
  14958.                            End               Display the last page of the
  14959.                                              file.
  14960.                            Esc               Exit the current file.
  14961.                            Ctrl-C            Quit LIST.
  14962.                            Up Arrow          Scroll up one line.
  14963.                            Down Arrow        Scroll down one line.
  14964.                            Left Arrow        Scroll left 8 columns.
  14965.                            Right Arrow       Scroll right 8 columns.
  14966.                            Ctrl- Left Arrow  Scroll left 40 columns.
  14967.                            Ctrl-Right Arrow  Scroll right 40 columns.
  14968.                            F1                Call the 4DOS online help
  14969.                            F                 Prompt and search for a string
  14970.                                              (case is ignored).
  14971.                            H                 Toggle the "strip high bit" (/H)
  14972.                                              option.
  14973.                            N                 Find next matching string (case
  14974.                                              is ignored).
  14975.  
  14976.  
  14977.           ___________________________________________________________________
  14978.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  255
  14979.  
  14980.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LIST
  14981.           ___________________________________________________________________
  14982.  
  14983.  
  14984.                            P                 Print the entire file on LPT1.
  14985.                            W                 Toggle the "line wrap" (/W)
  14986.                                              option.
  14987.  
  14988.                       LIST saves the search string used by F and N, so you
  14989.                       can LIST multiple files and search for the same string
  14990.                       simply by pressing N in each file, or repeat your
  14991.                       search the next time you use LIST.
  14992.  
  14993.                   ##  Most of the LIST keystrokes can be reassigned with
  14994.                       4DOS.INI file directives (see pages 131 and 135).
  14995.  
  14996.                   ##  You can set the default colors used by LIST (and
  14997.                       SELECT) using the ListColors directive in 4DOS.INI.  If
  14998.                       ListColors is not used the LIST display will use the
  14999.                       current screen colors.
  15000.  
  15001.           Options:##  /H(igh bit off):  Strip the high bit from each
  15002.                       character before displaying. This is useful when
  15003.                       displaying files created by some word processors that
  15004.                       turn on the high bit for formatting purposes.  If you
  15005.                       are displaying a word processor text file and see
  15006.                       unusual characters mixed in with the text, try this
  15007.                       option.
  15008.  
  15009.                       /S(tandard input):  Read from the standard input rather
  15010.                       than a file.  This allows you to redirect command
  15011.                       output and view it with LIST.  For example, to use LIST
  15012.                       to display the output of DIR:
  15013.  
  15014.                            c:\> dir | list /s
  15015.  
  15016.                       To redefine the DIR command to always display its
  15017.                       output via LIST, use this alias:
  15018.  
  15019.                            c:\> alias dir `*dir %& | list /s`
  15020.  
  15021.                       /W(rap):  Wrap the text at the right margin.  This
  15022.                       option is useful when displaying files that don't have
  15023.                       a carriage return at the end of each line.  The
  15024.                       horizontal scrolling keys are intended for use when the
  15025.                       display is not wrapped.  If you wrap the display with
  15026.                       /W (or with the W key from within LIST), then use the
  15027.                       scrolling keys, the wrapping will change as each line
  15028.                       is scrolled.  This may produce an unusual display,
  15029.                       depending on the structure of the file you are viewing.
  15030.  
  15031.  
  15032.  
  15033.  
  15034.           ___________________________________________________________________
  15035.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  256
  15036.  
  15037.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LOADBTM
  15038.           ___________________________________________________________________
  15039.  
  15040.  
  15041.           LOADBTM                                                       (New)
  15042.  
  15043.           Purpose:    Switch a batch file to or from BTM mode.
  15044.  
  15045.           Format:     LOADBTM [ON | OFF]
  15046.  
  15047.           Usage:      4DOS recognizes two kinds of batch files: .BAT and
  15048.                       .BTM.  Batch files executing in BTM mode run two to
  15049.                       five times faster than in BAT mode.  However, BTM mode
  15050.                       should not be used to load memory-resident programs,
  15051.                       nor should BTM mode be used for self-modifying batch
  15052.                       files.  Batch files automatically start in the mode
  15053.                       indicated by their file extension, .BAT or .BTM.
  15054.  
  15055.                       The LOADBTM command turns BTM mode on and off.  It can
  15056.                       be used to switch modes in either a .BAT or .BTM file.
  15057.                       It can also be used to display the current batch mode
  15058.                       from inside a batch file when it is used with no
  15059.                       argument.
  15060.  
  15061.                       LOADBTM can only be used within a .BAT or .BTM file.
  15062.                       It is most often used to switch a .BAT file into BTM
  15063.                       mode after memory-resident programs are loaded, to
  15064.                       convert a .BAT file to BTM mode without changing its
  15065.                       extension, or to switch a .BTM file into BAT mode in
  15066.                       order to load memory-resident programs.
  15067.  
  15068.                       Using LOADBTM to repeatedly switch modes within a .BAT
  15069.                       or .BTM file is not efficient.  In most cases, the
  15070.                       speed gained by running some parts of the file in BTM
  15071.                       mode will be more than offset by the speed lost through
  15072.                       repeated loading of the file each time BTM mode is
  15073.                       invoked.
  15074.  
  15075.                       The following .BAT file fragment loads some memory
  15076.                       resident programs (TSRs), and then switches to BTM
  15077.                       mode:
  15078.  
  15079.                            rem   Because this file has a .BAT extension,
  15080.                            rem   the initial default state is LOADBTM OFF
  15081.                            rem   Loading TSRs...
  15082.                            ansi.com
  15083.                            mouse.com
  15084.                            rem   Switch to high-speed (BTM) mode now that
  15085.                            rem   TSRs are loaded
  15086.                            loadbtm on
  15087.                            path c:\;c:\util;c:\dos
  15088.                            alias /r c:\aliases
  15089.  
  15090.  
  15091.           ___________________________________________________________________
  15092.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  257
  15093.  
  15094.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LOADBTM
  15095.           ___________________________________________________________________
  15096.  
  15097.  
  15098.                       For more information on .BTM and .BAT files, see page
  15099.                       99.
  15100.  
  15101.  
  15102.  
  15103.  
  15104.  
  15105.  
  15106.  
  15107.  
  15108.  
  15109.  
  15110.  
  15111.  
  15112.  
  15113.  
  15114.  
  15115.  
  15116.  
  15117.  
  15118.  
  15119.  
  15120.  
  15121.  
  15122.  
  15123.  
  15124.  
  15125.  
  15126.  
  15127.  
  15128.  
  15129.  
  15130.  
  15131.  
  15132.  
  15133.  
  15134.  
  15135.  
  15136.  
  15137.  
  15138.  
  15139.  
  15140.  
  15141.  
  15142.  
  15143.  
  15144.  
  15145.  
  15146.  
  15147.  
  15148.           ___________________________________________________________________
  15149.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  258
  15150.  
  15151.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LOG
  15152.           ___________________________________________________________________
  15153.  
  15154.  
  15155.           LOG                                                           (New)
  15156.  
  15157.           Purpose:    Save a log of commands to a disk file.
  15158.  
  15159.           Format:     LOG [/W file] [ON | OFF | text]
  15160.  
  15161.                       file:  The name of the file to hold the log.
  15162.                       text:  An optional message that will be added to the
  15163.                       log.
  15164.  
  15165.                       /W(rite to).
  15166.  
  15167.                       See also: HISTORY.
  15168.  
  15169.           Usage:      LOG keeps a record of all internal and external
  15170.                       commands you use.  Each entry includes the current
  15171.                       system date and time, along with the actual command
  15172.                       after any alias or variable expansion.  You can use the
  15173.                       log file as a record of your daily activities.
  15174.  
  15175.                       By default, LOG writes commands to the file 4DOSLOG in
  15176.                       the root directory of the drive specified in your
  15177.                       COMSPEC environment variable (see page 115).
  15178.  
  15179.                       Entering LOG with no parameters displays the log status
  15180.                       (ON or OFF):
  15181.  
  15182.                            c:\> log
  15183.                            LOG is OFF
  15184.  
  15185.                       To enable or disable logging, add the word "ON" or
  15186.                       "OFF" after the LOG command:
  15187.  
  15188.                            c:\> log on
  15189.  
  15190.                       Entering LOG with text writes a message to the log
  15191.                       file, even if LOG is set OFF.  This allows you to enter
  15192.                       headers in the log file:
  15193.  
  15194.                            c:\> log "Started work on the database system"
  15195.  
  15196.                       The LOG file format looks like this:
  15197.  
  15198.                            [mm-dd-yy  hh:mm:ss]  command
  15199.  
  15200.                       The LOG output can be used as the basis for writing
  15201.                       batch files, but you will probably find HISTORY more
  15202.                       effective for this purpose.
  15203.  
  15204.  
  15205.           ___________________________________________________________________
  15206.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  259
  15207.  
  15208.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  LOG
  15209.           ___________________________________________________________________
  15210.  
  15211.  
  15212.           Options:    /W(rite):  This switch specifies a different filename
  15213.                       for the LOG output.  It also automatically performs a
  15214.                       LOG ON command.  For example, to turn logging on and
  15215.                       write the log to C:\LOG\LOGFILE:
  15216.  
  15217.                            c:\> log /w c:\log\logfile
  15218.  
  15219.  
  15220.  
  15221.  
  15222.  
  15223.  
  15224.  
  15225.  
  15226.  
  15227.  
  15228.  
  15229.  
  15230.  
  15231.  
  15232.  
  15233.  
  15234.  
  15235.  
  15236.  
  15237.  
  15238.  
  15239.  
  15240.  
  15241.  
  15242.  
  15243.  
  15244.  
  15245.  
  15246.  
  15247.  
  15248.  
  15249.  
  15250.  
  15251.  
  15252.  
  15253.  
  15254.  
  15255.  
  15256.  
  15257.  
  15258.  
  15259.  
  15260.  
  15261.  
  15262.           ___________________________________________________________________
  15263.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  260
  15264.  
  15265.                            CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MD / MKDIR
  15266.           ___________________________________________________________________
  15267.  
  15268.  
  15269.           MD / MKDIR                                             (Compatible)
  15270.  
  15271.           Purpose:    Create a subdirectory.
  15272.  
  15273.           Format:     MD pathname...
  15274.                            or
  15275.                       MKDIR pathname...
  15276.  
  15277.                       pathname:  The name of one or more directories to
  15278.                       create.
  15279.  
  15280.                       See also: RD.
  15281.  
  15282.           Usage:      MD and MKDIR are synonyms.  You can use either one.
  15283.  
  15284.                       MD creates a subdirectory anywhere in the directory
  15285.                       tree.  To create a subdirectory from the root, start
  15286.                       the pathname with a backslash [\].  For example, this
  15287.                       command creates a subdirectory called MYDIR in the root
  15288.                       directory:
  15289.  
  15290.                            c:\> md \mydir
  15291.  
  15292.                       If no path is given, the new subdirectory is created in
  15293.                       the current directory.  This example creates a
  15294.                       subdirectory called DIRTWO in the current directory:
  15295.  
  15296.                            c:\mydir> md dirtwo
  15297.  
  15298.                       To create a directory from the parent of the current
  15299.                       directory (that is, to create a sibling of the current
  15300.                       directory), start the pathname with two periods and a
  15301.                       backslash [..\].
  15302.  
  15303.                       MD creates one directory at a time.  If you need to
  15304.                       create the directory C:\ONE\TWO\THREE and none of the
  15305.                       named directories exist, you must create each directory
  15306.                       separately.  However, because MD accepts multiple
  15307.                       arguments, you can still create all three directories
  15308.                       in sequence with one command:
  15309.  
  15310.                            c:\> md \one \one\two \one\two\three
  15311.  
  15312.                   ##  DOS will not accept directory names longer than 64
  15313.                       characters.  You must be sure that the complete
  15314.                       directory name from the root to your deepest
  15315.                       subdirectory fits within the 64 character restriction.
  15316.  
  15317.  
  15318.  
  15319.           ___________________________________________________________________
  15320.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  261
  15321.  
  15322.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MEMORY
  15323.           ___________________________________________________________________
  15324.  
  15325.  
  15326.           MEMORY                                                        (New)
  15327.  
  15328.           Purpose:    Display the amount and status of system RAM.
  15329.  
  15330.           Format:     MEMORY
  15331.  
  15332.           Usage:      MEMORY displays information about the RAM in your
  15333.                       system.  It lists the amount of total RAM in your
  15334.                       system and the amount available for applications after
  15335.                       DOS, 4DOS, and memory-resident programs have been
  15336.                       loaded;  the amount of EMS expanded memory, XMS
  15337.                       extended memory, and non-XMS extended memory;  the HMA
  15338.                       status; and the amount of memory 4DOS is using for
  15339.                       environment variable space, alias space, and history
  15340.                       space:
  15341.  
  15342.                            c:\> memory
  15343.                                655,360 bytes total RAM
  15344.                                534,464 bytes free
  15345.  
  15346.                              1,687,552 bytes total EMS memory
  15347.                              1,097,728 bytes free
  15348.  
  15349.                                914,432 bytes total XMS memory (HMA in use)
  15350.  
  15351.                                    512 bytes total environment
  15352.                                    195 bytes free
  15353.  
  15354.                                  1,024 bytes total alias
  15355.                                    452 bytes free
  15356.  
  15357.                                  1,024 bytes total history
  15358.  
  15359.                       You can use the information from the MEMORY display to
  15360.                       fine tune your system, to aid in setting the proper
  15361.                       alias and environment sizes in 4DOS.INI, and to be sure
  15362.                       that you have sufficient memory for your largest
  15363.                       applications.
  15364.  
  15365.                       If you compare the free RAM displayed by MEMORY with
  15366.                       the free RAM displayed by CHKDSK and some memory map
  15367.                       programs, MEMORY will usually show a slightly higher
  15368.                       value.  The difference is the size of the environment
  15369.                       passed to these external programs;  most memory mapping
  15370.                       programs do not count the passed environment as free
  15371.                       space, but MEMORY does.
  15372.  
  15373.  
  15374.  
  15375.  
  15376.           ___________________________________________________________________
  15377.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  262
  15378.  
  15379.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MOVE
  15380.           ___________________________________________________________________
  15381.  
  15382.  
  15383.           MOVE                                                          (New)
  15384.  
  15385.           Purpose:    Move files to a new directory and drive.
  15386.  
  15387.           Format:     MOVE  [/C /D /H /N /P /Q /R /S /U] source...
  15388.                       destination
  15389.  
  15390.                       source:  A file or list of files to move.
  15391.                       destination:  The new location for the files.
  15392.  
  15393.                       /C(hanged)                  /Q(uiet)
  15394.                       /D(irectory)                /R(eplace)
  15395.                       /H(idden and system)        /S(ubdirectory tree)
  15396.                       /N(othing)                  /U(pdate)
  15397.                       /P(rompt)
  15398.  
  15399.                       See also: COPY and RENAME.
  15400.  
  15401.           Usage:      The MOVE command moves one or more files from one
  15402.                       directory to another, whether the directories are on
  15403.                       the same drive or not.  It has the same effect as
  15404.                       copying the files to a new location and then deleting
  15405.                       the originals.  Like COPY and RENAME, MOVE works with
  15406.                       single files, multiple files, and sets of files
  15407.                       specified with an include list.  Like those commands,
  15408.                       MOVE never changes the attributes of the files that it
  15409.                       operates on.
  15410.  
  15411.                       The simplest MOVE command moves a single source file to
  15412.                       a new location and, optionally, gives it a new name.
  15413.                       These two examples both move one file from drive C: to
  15414.                       the root directory on drive A:
  15415.  
  15416.                            c:\> move myfile.dat a:\
  15417.                            c:\> move myfile.dat a:\savefile.dat
  15418.  
  15419.                       In both cases, MYFILE.DAT is removed from drive C:
  15420.                       after it has been copied to drive A:.  If a file called
  15421.                       MYFILE.DAT in the first example, or SAVEFILE.DAT in the
  15422.                       second example, already existed on drive A:, it would
  15423.                       be overwritten.  (This demonstrates the difference
  15424.                       between MOVE and RENAME.  MOVE will move files between
  15425.                       drives and will overwrite the destination file if it
  15426.                       exists; RENAME will not.)
  15427.  
  15428.                       If you MOVE multiple files, the destination must be a
  15429.                       directory name.  MOVE will move each file into the
  15430.                       destination directory with its original name (if the
  15431.  
  15432.  
  15433.           ___________________________________________________________________
  15434.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  263
  15435.  
  15436.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MOVE
  15437.           ___________________________________________________________________
  15438.  
  15439.  
  15440.                       target is not a directory, MOVE will display an error
  15441.                       message and exit):
  15442.  
  15443.                            c:\> move *.wks *.txt c:\finance\myfiles
  15444.  
  15445.                       You cannot move a file to a character device like the
  15446.                       printer, or to itself.
  15447.  
  15448.                   !   Be careful when you use MOVE with the SELECT command.
  15449.                       If you SELECT multiple files and if the target is not a
  15450.                       directory (because of a misspelling, for example) each
  15451.                       file will be moved in turn to the target file,
  15452.                       overwriting the previous file, and then the original
  15453.                       will be erased before the next file is moved.  At the
  15454.                       end of the command, all of the original files will have
  15455.                       been erased and only the last file will exist as the
  15456.                       target file.  You can avoid this problem by using
  15457.                       square brackets with SELECT instead of parentheses (be
  15458.                       sure that you don't allow the command line to get too
  15459.                       long -- watch the character count in the upper left
  15460.                       corner while you're selecting files).  MOVE will then
  15461.                       receive one list of files to move instead of a series
  15462.                       of individual filenames, and it will detect the error
  15463.                       and halt.  You can also add a backslash [\] to the end
  15464.                       of the destination name to ensure that it is the name
  15465.                       of a subdirectory (see below).
  15466.  
  15467.                       When you move files to another directory, if you add a
  15468.                       backslash [\] to the end of the destination name MOVE
  15469.                       will display an error message if the name does not
  15470.                       refer to an existing directory.  You can use this
  15471.                       feature to keep MOVE from treating a mistyped
  15472.                       destination directory name as a file name, and
  15473.                       attempting to move all source files to that name.  The
  15474.                       /D option performs the same function but will also
  15475.                       prompt to see if you want to create the destination
  15476.                       directory if it doesn't exist.  The /S option always
  15477.                       tries to create the destination directory if necessary,
  15478.                       so this feature will not be effective when /S is used.
  15479.  
  15480.                   ##  MOVE first attempts to rename the file(s), which is the
  15481.                       fastest way to move files between subdirectories on the
  15482.                       same drive.  If that fails (the destination is on a
  15483.                       different drive or already exists), MOVE will copy the
  15484.                       file(s) and then delete the originals.
  15485.  
  15486.           Options:    /C(hanged files):  Move files only if the destination
  15487.                       file exists and is older than the source (see also /U).
  15488.  
  15489.  
  15490.           ___________________________________________________________________
  15491.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  264
  15492.  
  15493.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MOVE
  15494.           ___________________________________________________________________
  15495.  
  15496.  
  15497.                       This option is useful for updating the files in one
  15498.                       directory from those in another without moving any
  15499.                       newly created files.
  15500.  
  15501.                       /D(irectory):  Requires that the destination be a
  15502.                       directory.  If the destination does not exist, MOVE
  15503.                       will prompt to see if you want to create it.  If the
  15504.                       destination exists as a file, MOVE will fail with an
  15505.                       "Access denied" error.  Use this option to avoid having
  15506.                       MOVE accidentally interpret your destination name as a
  15507.                       file name when it's really a mistyped directory name.
  15508.  
  15509.                   ##  /H(idden):  Move all files, including hidden and system
  15510.                       files.
  15511.  
  15512.                   ##  /N(othing):  Do everything except actually move the
  15513.                       file(s)   This option is most useful for testing what a
  15514.                       complex MOVE command will do.
  15515.  
  15516.                       /P(rompt):  Ask the user to confirm each move by
  15517.                       pressing Y or N.  An N response will skip that
  15518.                       particular file.
  15519.  
  15520.                       /Q(uiet):  Don't display filenames as they are moved.
  15521.  
  15522.                       /R(eplace):  Prompt for a Y or N response before
  15523.                       overwriting an existing destination file.
  15524.  
  15525.                   ##  /S(ubdirectories):  Move an entire subdirectory tree to
  15526.                       another location.  MOVE will attempt to create the
  15527.                       destination directories if they don't exist, and will
  15528.                       remove empty subdirectories after the move.  When /D is
  15529.                       used with /S, you will be prompted if the first
  15530.                       destination directory does not exist, but
  15531.                       subdirectories below that will be created automatically
  15532.                       by MOVE.  For example, the following alias will "graft"
  15533.                       a directory and all of its subdirectories into a new
  15534.                       place in the directory tree, and -- because /D is used
  15535.                       -- will prompt to see if you want to create the first
  15536.                       destination directory it if it doesn't exist.  The /H
  15537.                       in this alias ensures that any hidden files and
  15538.                       subdirectories are also moved:
  15539.  
  15540.                            alias graft `move /s/d/h %1\*.* %2`
  15541.  
  15542.                       /U(pdate):  Move each source file only if it is newer
  15543.                       than a matching destination file or if a matching
  15544.                       destination file does not exist (also see /C).  This
  15545.  
  15546.  
  15547.           ___________________________________________________________________
  15548.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  265
  15549.  
  15550.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  MOVE
  15551.           ___________________________________________________________________
  15552.  
  15553.  
  15554.                       option is useful for moving new files from one
  15555.                       directory to another.
  15556.  
  15557.  
  15558.  
  15559.  
  15560.  
  15561.  
  15562.  
  15563.  
  15564.  
  15565.  
  15566.  
  15567.  
  15568.  
  15569.  
  15570.  
  15571.  
  15572.  
  15573.  
  15574.  
  15575.  
  15576.  
  15577.  
  15578.  
  15579.  
  15580.  
  15581.  
  15582.  
  15583.  
  15584.  
  15585.  
  15586.  
  15587.  
  15588.  
  15589.  
  15590.  
  15591.  
  15592.  
  15593.  
  15594.  
  15595.  
  15596.  
  15597.  
  15598.  
  15599.  
  15600.  
  15601.  
  15602.  
  15603.  
  15604.           ___________________________________________________________________
  15605.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  266
  15606.  
  15607.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PATH
  15608.           ___________________________________________________________________
  15609.  
  15610.  
  15611.           PATH                                                     (Enhanced)
  15612.  
  15613.           Purpose:    Display or alter the list of directories that 4DOS will
  15614.                       search for executable and batch files that are not in
  15615.                       the current directory.
  15616.  
  15617.           Format:     PATH [directory[;directory...]]
  15618.  
  15619.                       directory:  The full name of a directory to include in
  15620.                       the path setting.
  15621.  
  15622.                       See also: SET and ESET.
  15623.  
  15624.           Usage:      When 4DOS is asked to execute an external command (a
  15625.                       .COM, .EXE, .BTM, or .BAT file or executable
  15626.                       extension), it first looks for the file in the current
  15627.                       directory.  If it fails to find an executable file
  15628.                       there, it then searches each of the directories
  15629.                       specified in the path setting, in the order that they
  15630.                       are included.
  15631.  
  15632.                       For example, the following PATH command directs 4DOS to
  15633.                       search subdirectories for an executable file in the
  15634.                       following order: the current directory, the root
  15635.                       directory on C, the DOS subdirectory on C, and the UTIL
  15636.                       subdirectory on C:
  15637.  
  15638.                            c:\> path c:\;c:\dos;c:\util
  15639.  
  15640.                       The list of directories to search can be set or viewed
  15641.                       with the PATH command.  The list is stored as an
  15642.                       environment string, and can also be set or viewed with
  15643.                       the SET command and edited with the ESET command.
  15644.  
  15645.                       Directory names in the path must be separated by
  15646.                       semicolons [;].  4DOS shifts each directory name to
  15647.                       upper case.  This maintains compatibility with programs
  15648.                       which can only recognize upper case directory names in
  15649.                       the path variable.
  15650.  
  15651.                       If you modify your path with the SET or ESET command,
  15652.                       you may include directory names in lower case.  These
  15653.                       may cause trouble with some programs, which assume that
  15654.                       all path entries have been shifted to upper case.
  15655.  
  15656.                       If you enter PATH with no parameters, 4DOS displays the
  15657.                       current search path:
  15658.  
  15659.  
  15660.  
  15661.           ___________________________________________________________________
  15662.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  267
  15663.  
  15664.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PATH
  15665.           ___________________________________________________________________
  15666.  
  15667.  
  15668.                            c:\> path
  15669.                            PATH=C:\;C:\DOS;C:\UTIL
  15670.  
  15671.                       If you enter PATH and a semicolon, 4DOS clears the
  15672.                       search path and will search only the current directory
  15673.                       (this is the default at system startup).
  15674.  
  15675.                       Some applications also use the PATH variable to search
  15676.                       for their data files.
  15677.  
  15678.                   ##  If you include an explicit file extension on the
  15679.                       external command name (for example, WP.EXE), 4DOS will
  15680.                       only look for files with that name and extension in the
  15681.                       current directory and every directory in the path
  15682.                       setting.  It will not look for other executable files
  15683.                       with the same base name.
  15684.  
  15685.                   ##  If you have a directory of a single period [.] in the
  15686.                       path, 4DOS will not search the current directory first,
  15687.                       but wait until it reaches that point in the path.  In
  15688.                       rare cases, this feature may not be compatible with
  15689.                       applications which use the path to search for their
  15690.                       files; if you experience a problem, you will have to
  15691.                       remove the "." as a path entry while using any such
  15692.                       application.
  15693.  
  15694.                   ##  4DOS can create a PATH as long as 250 characters (the
  15695.                       command line is limited to 255 characters, and "PATH "
  15696.                       takes five).  Some applications are written to expect a
  15697.                       PATH no longer than the traditional limit of 123
  15698.                       characters.  If you have extended your path beyond the
  15699.                       traditional limit and experience unusual problems with
  15700.                       application programs, see page 157 for tips on
  15701.                       resolving the difficulty.
  15702.  
  15703.                   ##  If you specify an invalid directory in the path, 4DOS
  15704.                       will skip that directory and continue searching with
  15705.                       the next directory in the path.
  15706.  
  15707.  
  15708.  
  15709.  
  15710.  
  15711.  
  15712.  
  15713.  
  15714.  
  15715.  
  15716.  
  15717.  
  15718.           ___________________________________________________________________
  15719.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  268
  15720.  
  15721.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PAUSE
  15722.           ___________________________________________________________________
  15723.  
  15724.  
  15725.           PAUSE                                                    (Enhanced)
  15726.  
  15727.           Purpose:    Suspend batch file or alias execution.
  15728.  
  15729.           Format:     PAUSE [text]
  15730.  
  15731.                       text:  The message to be displayed as a user prompt.
  15732.  
  15733.           Usage:      A PAUSE command will suspend execution of a batch file
  15734.                       or alias, giving you the opportunity to change disks,
  15735.                       turn on the printer, etc.
  15736.  
  15737.                       PAUSE waits for any key to be pressed and then
  15738.                       continues execution.  You can specify the text that
  15739.                       PAUSE displays while it waits for a keystroke, or let
  15740.                       4DOS use the default message:
  15741.  
  15742.                            Press any key when ready...
  15743.  
  15744.                       For example, the following batch file fragment prompts
  15745.                       the user before erasing files (the PAUSE command should
  15746.                       be entered on one line):
  15747.  
  15748.                            pause Press Ctrl-C to abort, any other key to
  15749.                              erase all .LST files
  15750.                            erase *.lst
  15751.  
  15752.                       If you press Ctrl-C or Ctrl-BREAK while PAUSE is
  15753.                       waiting for a key, execution of an alias will be
  15754.                       terminated, and execution of a batch file will be
  15755.                       suspended while you are asked whether you want to
  15756.                       cancel the batch job.
  15757.  
  15758.  
  15759.  
  15760.  
  15761.  
  15762.  
  15763.  
  15764.  
  15765.  
  15766.  
  15767.  
  15768.  
  15769.  
  15770.  
  15771.  
  15772.  
  15773.  
  15774.  
  15775.           ___________________________________________________________________
  15776.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  269
  15777.  
  15778.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  POPD
  15779.           ___________________________________________________________________
  15780.  
  15781.  
  15782.           POPD                                                          (New)
  15783.  
  15784.           Purpose:    Return to the disk drive and directory at the top of
  15785.                       the directory stack
  15786.  
  15787.           Format:     POPD [*]
  15788.  
  15789.                       See also: DIRS and PUSHD.
  15790.  
  15791.           Usage:      Each time you use the PUSHD command, 4DOS saves the
  15792.                       current disk drive and directory on its internal
  15793.                       directory stack.  POPD restores the last drive and
  15794.                       directory that was saved with PUSHD and removes that
  15795.                       entry from the stack.  You can use these commands
  15796.                       together to change directories, perform some work, and
  15797.                       return to the starting drive and directory.
  15798.  
  15799.                       This example saves and changes the current disk drive
  15800.                       and directory with PUSHD, and then restores it.  The
  15801.                       command line prompt is set to show the current
  15802.                       directory:
  15803.  
  15804.                            c:\> pushd d:\database\test
  15805.                            d:\database\test> pushd c:\wordp\memos
  15806.                            c:\wordp\memos> pushd a:\123
  15807.                            a:\123> popd
  15808.                            c:\wordp\memos> popd
  15809.                            d:\database\test> popd
  15810.                            c:\>
  15811.  
  15812.                       You can use the DIRS command to see the complete list
  15813.                       of saved drives and directories (the directory stack).
  15814.  
  15815.                       The POPD command followed by an asterisk [*] clears the
  15816.                       directory stack without changing the current drive and
  15817.                       directory.
  15818.  
  15819.                   ##  If the directory on the top of the stack is not on the
  15820.                       current drive, POPD will switch to the drive and
  15821.                       directory on the top of the stack without changing the
  15822.                       default directory on the current drive.
  15823.  
  15824.  
  15825.  
  15826.  
  15827.  
  15828.  
  15829.  
  15830.  
  15831.  
  15832.           ___________________________________________________________________
  15833.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  270
  15834.  
  15835.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PROMPT
  15836.           ___________________________________________________________________
  15837.  
  15838.  
  15839.           PROMPT                                                        (New)
  15840.  
  15841.           Purpose:    Change the 4DOS command line prompt.
  15842.  
  15843.           Format:     PROMPT [text]
  15844.  
  15845.                       text:  Text to be used as the 4DOS command line prompt.
  15846.  
  15847.           Usage:      You can change and customize the command line prompt at
  15848.                       any time.  The prompt can include normal text and
  15849.                       system information such as the current drive and
  15850.                       directory, the time and date, and the amount of memory
  15851.                       available.  You can create an informal "Hello, Bob!"
  15852.                       prompt or an official-looking prompt full of impressive
  15853.                       information.
  15854.  
  15855.                       The PROMPT command sets the command line prompt.  The
  15856.                       special characters that can be included in a PROMPT
  15857.                       command are listed below.  For example, to set the
  15858.                       prompt to the current date and time, with a ">" at the
  15859.                       end:
  15860.  
  15861.                            c:\> prompt $d $t $g
  15862.                            Mon  Dec 2, 1991 10:29:19 >
  15863.  
  15864.                       To set the prompt to the current date and time,
  15865.                       followed by the current drive and directory in upper
  15866.                       case on the next line, with a ">" at the end:
  15867.  
  15868.                            c:\> prompt $d $t$_$P$g
  15869.                            Mon  Dec 2, 1991 10:29:19
  15870.                            C:\>
  15871.  
  15872.                       You can include the PROMPT command in your AUTOEXEC.BAT
  15873.                       file to set the prompt whenever your system is
  15874.                       rebooted.
  15875.  
  15876.                       The default prompt is $n$g (drive name plus ">")  on
  15877.                       drives A and B, and $p$g (current drive and directory
  15878.                       plus ">") on all other drives .
  15879.  
  15880.                       If you enter PROMPT with no arguments, 4DOS resets the
  15881.                       prompt to the default.  The PROMPT command sets the
  15882.                       environment variable PROMPT, so to view the current
  15883.                       prompt setting use the command:
  15884.  
  15885.                            c:\> set prompt
  15886.  
  15887.  
  15888.  
  15889.           ___________________________________________________________________
  15890.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  271
  15891.  
  15892.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PROMPT
  15893.           ___________________________________________________________________
  15894.  
  15895.  
  15896.                       If the prompt is not set at all 4DOS will not use the
  15897.                       PROMPT environment variable, in which case the SET
  15898.                       command above will give a "Not in environment" error.
  15899.  
  15900.                   ##  Along with literal text, special characters, and ANSI
  15901.                       sequences, you can include the text of any environment
  15902.                       variable, 4DOS internal variable, or variable function
  15903.                       (see pages 81 and 85) in a prompt.  For example, if you
  15904.                       want to include the amount of free base memory in the
  15905.                       command prompt, plus the current drive and directory,
  15906.                       you could use this command:
  15907.  
  15908.                            c:\> prompt (%%@dosmem[K]K) $p$g
  15909.                            (601K) c:\data>
  15910.  
  15911.                       Notice that the @DOSMEM function is shown with two
  15912.                       leading percent signs [%].  If you used only one per
  15913.                       cent sign, the @DOSMEM function would be expanded once
  15914.                       when the PROMPT command was executed, instead of every
  15915.                       time 4DOS displayed the prompt.  The result would be
  15916.                       that the amount of memory would never change from the
  15917.                       value it had when you entered the PROMPT command.  You
  15918.                       could also use back quotes to delay expanding the
  15919.                       variable function until the prompt is displayed:
  15920.  
  15921.                            c:\> prompt `(%@dosmem[K]K) $p$g`
  15922.  
  15923.                   ##  If you have an ANSI-compatible driver installed, you
  15924.                       can include ANSI escape sequences in the PROMPT text.
  15925.                       This example uses ANSI sequences to set a prompt that
  15926.                       displays the shell level, date, time and path in color
  15927.                       on the top line of the screen (enter the command as one
  15928.                       line):
  15929.  
  15930.                            c:\> prompt $e[s$e[1;1f$e[41;1;37m$e[K[$z] $d
  15931.                                 Time: $t$h$h$h  Path: $p$e[u$e[0;32m$n$g
  15932.  
  15933.                   ##  Traditionally, it was possible to use the PROMPT
  15934.                       command in a batch file to transmit ANSI.SYS control
  15935.                       sequences to the screen (for example, to redefine
  15936.                       function keys).  This technique will not work with
  15937.                       4DOS, which doesn't display a prompt within batch
  15938.                       files; hence the characters in the PROMPT string are
  15939.                       never sent to ANSI.SYS.  To send ANSI sequences in
  15940.                       4DOS, use the ECHO command, substituting a Ctrl-X
  15941.                       followed by an e for $e in the PROMPT string.
  15942.  
  15943.  
  15944.  
  15945.  
  15946.           ___________________________________________________________________
  15947.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  272
  15948.  
  15949.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PROMPT
  15950.           ___________________________________________________________________
  15951.  
  15952.  
  15953.                   ##  You may find it helpful to define a different prompt in
  15954.                       secondary shells, by using $z to display the shell
  15955.                       level, or by placing a PROMPT command in your 4START
  15956.                       file and using IF or IFF statements to set the
  15957.                       appropriate prompt for different shells.
  15958.  
  15959.                       Prompt Characters:
  15960.  
  15961.                       The prompt text can contain special commands in the
  15962.                       form $?, where ? is one of the characters listed below.
  15963.                            b    The vertical bar character [|]
  15964.                            c    The open parenthesis [(]
  15965.                            D    Current date, in the format:  Tue  Jan 1,
  15966.                                    1991
  15967.                            d    Current date, in the format:  Tue  1-01-91
  15968.                            e    The ASCII ESC character (decimal 27)
  15969.                            f    The close parenthesis [)]
  15970.                            g    The > character
  15971.                            h    BACKSPACE over the previous character
  15972.                            l    The < character
  15973.                            n    Current disk letter
  15974.                            P    Current disk and directory (upper case)
  15975.                            p    Current disk and directory (lower case)
  15976.                            q    The = character
  15977.                            s    The space character
  15978.                            t    Current time, in the format hh:mm:ss
  15979.                            v    DOS version number, in the format 3.10
  15980.                            Xd:  Current directory on drive d:, in upper case
  15981.                            xd:  Current directory on drive d:, in lower case
  15982.                            z    Current 4DOS shell nesting level; the
  15983.                                    primary command processor is shell 0.
  15984.                            $    The $ character
  15985.                            _    CR/LF (go to beginning of a new line)
  15986.  
  15987.                   ##  The format for the date ($d) depends on the country
  15988.                       code defined in the CONFIG.SYS file or by the CHCP
  15989.                       command.  The default format is U.S. (mm-dd-yy).  The
  15990.                       European format is dd-mm-yy; the Japanese is yy-mm-dd.
  15991.                       The separator used for the time ($t) will also be
  15992.                       changed based on the country definition.
  15993.  
  15994.  
  15995.  
  15996.  
  15997.  
  15998.  
  15999.  
  16000.  
  16001.  
  16002.  
  16003.           ___________________________________________________________________
  16004.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  273
  16005.  
  16006.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PUSHD
  16007.           ___________________________________________________________________
  16008.  
  16009.  
  16010.           PUSHD                                                         (New)
  16011.  
  16012.           Purpose:    Save the current disk drive and directory, optionally
  16013.                       moving to a new drive and directory.
  16014.  
  16015.           Format:     PUSHD [pathname]
  16016.  
  16017.                       pathname:  The name of the new default drive and
  16018.                       directory.
  16019.  
  16020.                       See also: DIRS, POPD and CDPATH on page 116.
  16021.  
  16022.           Usage:      PUSHD saves the current drive and directory on a "last
  16023.                       in, first out" directory stack.  The POPD command
  16024.                       returns to the last drive and directory that was saved
  16025.                       by PUSHD.  You can use these commands together to
  16026.                       change directories, perform some work, and return to
  16027.                       the starting drive and directory.
  16028.  
  16029.                       The DIRS command displays the contents of the directory
  16030.                       stack.
  16031.  
  16032.                       To save the current drive and directory, without
  16033.                       changing directories:
  16034.  
  16035.                            c:\> pushd
  16036.                            c:\>
  16037.  
  16038.                       If a pathname is specified as part of the PUSHD
  16039.                       command, the current drive and directory are saved and
  16040.                       the specified pathname becomes the new current drive
  16041.                       and directory.  If the pathname includes a drive
  16042.                       letter, PUSHD changes to the specified directory on the
  16043.                       new drive without changing the default current
  16044.                       directory on the original drive.
  16045.  
  16046.                       This example saves the current directory and changes to
  16047.                       C:\WORDP\MEMOS, then returns to the original directory
  16048.                       with POPD:
  16049.  
  16050.                            c:\> pushd \wordp\memos
  16051.                            c:\wordp\memos> popd
  16052.                            c:\>
  16053.  
  16054.                   ##  The directory stack can hold up to 255 characters or
  16055.                       about 10 to 20 entries depending on the length of the
  16056.                       directory names.  If you exceed the directory stack
  16057.  
  16058.  
  16059.  
  16060.           ___________________________________________________________________
  16061.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  274
  16062.  
  16063.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  PUSHD
  16064.           ___________________________________________________________________
  16065.  
  16066.  
  16067.                       size, the oldest directory is removed before adding the
  16068.                       current directory.
  16069.  
  16070.                   ##  If PUSHD can't change to the specified directory, it
  16071.                       will look for the CDPATH environment variable.  PUSHD
  16072.                       will append the specified directory name to each
  16073.                       directory in CDPATH and attempt to change to that drive
  16074.                       and directory, until the first match or the end of the
  16075.                       CDPATH argument.  This allows you to use CDPATH as a
  16076.                       quick way to find commonly used subdirectories which
  16077.                       have unique names.  For example, if you are currently
  16078.                       in the directory C:\WP\LETTERS\JANUARY and you'd like
  16079.                       to change to D:\SOFTWARE\UTIL, you could enter the
  16080.                       command:
  16081.  
  16082.                            c:\wp\letters\january> pushd d:\software\util
  16083.  
  16084.                       However if the D:\SOFTWARE directory is listed in your
  16085.                       CDPATH variable, and is the first directory in the list
  16086.                       with a UTIL subdirectory, you can simply enter the
  16087.                       command:
  16088.  
  16089.                            c:\wp\letters\january> pushd util
  16090.  
  16091.                       and 4DOS will change to D:\SOFTWARE\UTIL.
  16092.  
  16093.  
  16094.  
  16095.  
  16096.  
  16097.  
  16098.  
  16099.  
  16100.  
  16101.  
  16102.  
  16103.  
  16104.  
  16105.  
  16106.  
  16107.  
  16108.  
  16109.  
  16110.  
  16111.  
  16112.  
  16113.  
  16114.  
  16115.  
  16116.  
  16117.           ___________________________________________________________________
  16118.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  275
  16119.  
  16120.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  QUIT
  16121.           ___________________________________________________________________
  16122.  
  16123.  
  16124.           QUIT                                                          (New)
  16125.  
  16126.           Purpose:    Terminate the current batch file.
  16127.  
  16128.           Format:     QUIT [value]
  16129.  
  16130.                       value:  The exit code from 0 to 255 to return to 4DOS
  16131.                       or to the previous batch file.
  16132.  
  16133.                       See also: CANCEL.
  16134.  
  16135.           Usage:      QUIT provides a simple way to exit a batch file before
  16136.                       reaching the end of the file.  If you QUIT a batch file
  16137.                       called from another batch file, you will be returned to
  16138.                       the previous file at the line following the original
  16139.                       call.
  16140.  
  16141.                       This example batch file fragment checks to see if the
  16142.                       user entered "quit" and exits if true.
  16143.  
  16144.                            input  Enter your choice :  %%option
  16145.                            if  "%option" == "quit"  quit
  16146.  
  16147.                       To end all batch file processing, use the CANCEL
  16148.                       command.
  16149.  
  16150.                   ##  If you specify a value, QUIT will set the ERRORLEVEL or
  16151.                       exit code (see the IF command, and the %? variable on
  16152.                       page 81) to that value.
  16153.  
  16154.                   ##  You can also use QUIT in an alias.  If you QUIT an
  16155.                       alias while inside a batch file, QUIT will end both the
  16156.                       alias and the batch file and return you to the 4DOS
  16157.                       command prompt or to the calling batch file.
  16158.  
  16159.  
  16160.  
  16161.  
  16162.  
  16163.  
  16164.  
  16165.  
  16166.  
  16167.  
  16168.  
  16169.  
  16170.  
  16171.  
  16172.  
  16173.  
  16174.           ___________________________________________________________________
  16175.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  276
  16176.  
  16177.                            CHAPTER 8 / COMMAND REFERENCE GUIDE  /  RD / RMDIR
  16178.           ___________________________________________________________________
  16179.  
  16180.  
  16181.           RD / RMDIR                                               (Enhanced)
  16182.  
  16183.           Purpose:    Remove one or more subdirectories.
  16184.  
  16185.           Format:     RD pathname...
  16186.                            or
  16187.                       RMDIR pathname...
  16188.  
  16189.                       pathname:  The name of a subdirectory to remove.
  16190.  
  16191.                       See also: MD.
  16192.  
  16193.           Usage:      RD and RMDIR are synonyms.  You can use either one.
  16194.  
  16195.                       RD removes directories from the directory tree.  For
  16196.                       example, to remove the subdirectory MEMOS from the
  16197.                       subdirectory WP, you can use this command:
  16198.  
  16199.                            c:\> rd \wp\memos
  16200.  
  16201.                       Before using RD, you must delete all files and
  16202.                       subdirectories (and their files) in the pathname you
  16203.                       want to remove.  Remember to remove hidden and read-
  16204.                       only files as well as normal files.
  16205.  
  16206.                   ##  To use a single command to remove entire subdirectory
  16207.                       trees including all files, see the /S and /X options of
  16208.                       the DEL command.
  16209.  
  16210.                   ##  You cannot remove the root directory, the current
  16211.                       directory (.), or any directory above the current
  16212.                       directory in the directory tree.
  16213.  
  16214.                   ##  You can use wildcards in the pathname.
  16215.  
  16216.  
  16217.  
  16218.  
  16219.  
  16220.  
  16221.  
  16222.  
  16223.  
  16224.  
  16225.  
  16226.  
  16227.  
  16228.  
  16229.  
  16230.  
  16231.           ___________________________________________________________________
  16232.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  277
  16233.  
  16234.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  REBOOT
  16235.           ___________________________________________________________________
  16236.  
  16237.  
  16238.           REBOOT                                                        (New)
  16239.  
  16240.           Purpose:    Do a warm or cold system reboot.
  16241.  
  16242.           Format:     REBOOT [/C /V]
  16243.  
  16244.                       /C(old reboot)              /V(erify)
  16245.  
  16246.           ## Usage:   REBOOT will completely restart your computer.  It is
  16247.                       comparable to pressing Ctrl-Alt-Delete (a warm reboot)
  16248.                       or to turning the power off and back on or pressing the
  16249.                       reset button (a cold reboot).  A reboot is necessary to
  16250.                       activate any changes to your CONFIG.SYS file, and may
  16251.                       also be used if you wish to restart the system with an
  16252.                       altered 4START or AUTOEXEC.BAT file.
  16253.  
  16254.                       The following example prompts you to verify the reboot,
  16255.                       then does a cold boot:
  16256.  
  16257.                            c:\> reboot /c/v
  16258.  
  16259.                       REBOOT defaults to performing a warm boot, with no
  16260.                       prompting.
  16261.  
  16262.                       REBOOT flushes the disk buffers, resets the drives, and
  16263.                       waits one second before rebooting, to allow disk
  16264.                       caching programs to finish writing any cached data .
  16265.  
  16266.                   !   Some system BIOSes, memory managers, multitaskers, or
  16267.                       memory-resident programs (TSRs) may intercept attempts
  16268.                       to reboot your system, and defeat them entirely,
  16269.                       convert a cold boot request to a warm boot or vice
  16270.                       versa, or in very rare cases, hang the system --
  16271.                       requiring a reboot!  As a result you may need to
  16272.                       experiment with which reboot options work best for your
  16273.                       system hardware and software configuration, and under
  16274.                       rare circumstances REBOOT may not be useable on your
  16275.                       system.
  16276.  
  16277.           Options:    /C(old):  Do a "cold" reboot.  This is similar to
  16278.                       turning the power off and back on, and may be necessary
  16279.                       to properly initialize the system.  REBOOT /C may not
  16280.                       physically reset all hardware devices as thoroughly as
  16281.                       actually turning off the power; its effect depends on
  16282.                       the internal design of each hardware device and on your
  16283.                       system configuration.
  16284.  
  16285.  
  16286.  
  16287.  
  16288.           ___________________________________________________________________
  16289.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  278
  16290.  
  16291.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  REBOOT
  16292.           ___________________________________________________________________
  16293.  
  16294.  
  16295.                       /V(erify):  Prompt for confirmation (Y or N) before
  16296.                       rebooting.
  16297.  
  16298.  
  16299.  
  16300.  
  16301.  
  16302.  
  16303.  
  16304.  
  16305.  
  16306.  
  16307.  
  16308.  
  16309.  
  16310.  
  16311.  
  16312.  
  16313.  
  16314.  
  16315.  
  16316.  
  16317.  
  16318.  
  16319.  
  16320.  
  16321.  
  16322.  
  16323.  
  16324.  
  16325.  
  16326.  
  16327.  
  16328.  
  16329.  
  16330.  
  16331.  
  16332.  
  16333.  
  16334.  
  16335.  
  16336.  
  16337.  
  16338.  
  16339.  
  16340.  
  16341.  
  16342.  
  16343.  
  16344.  
  16345.           ___________________________________________________________________
  16346.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  279
  16347.  
  16348.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  REM
  16349.           ___________________________________________________________________
  16350.  
  16351.  
  16352.           REM                                                    (Compatible)
  16353.  
  16354.           Purpose:    Put a comment in a batch file.
  16355.  
  16356.           Format:     REM [comment]
  16357.  
  16358.                       comment:  The text to include in the batch file.
  16359.  
  16360.           Usage:      The REM command lets you place a remark or comment in a
  16361.                       batch file.  Batch file comments are useful for
  16362.                       documenting the purpose of a batch file and the
  16363.                       procedures you have used.  For example
  16364.  
  16365.                            rem This batch file provides a
  16366.                            rem menu-based system for accessing
  16367.                            rem word processing utilities.
  16368.                            rem
  16369.                            rem Clear the screen and get selection
  16370.                            cls
  16371.  
  16372.                       REM must be followed by a space or tab character and
  16373.                       then your comment.  Comments can be up to 255
  16374.                       characters long.  4DOS will ignore everything on the
  16375.                       line after the REM command (including quote characters,
  16376.                       redirection symbols, and other commands).
  16377.  
  16378.                       If ECHO is ON, 4DOS will display the comment.
  16379.                       Otherwise, 4DOS will ignore it.
  16380.  
  16381.                       If ECHO is ON and you don't want to display the line,
  16382.                       preface the REM command with the @ character.
  16383.  
  16384.  
  16385.  
  16386.  
  16387.  
  16388.  
  16389.  
  16390.  
  16391.  
  16392.  
  16393.  
  16394.  
  16395.  
  16396.  
  16397.  
  16398.  
  16399.  
  16400.  
  16401.  
  16402.           ___________________________________________________________________
  16403.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  280
  16404.  
  16405.                          CHAPTER 8 / COMMAND REFERENCE GUIDE  /  REN / RENAME
  16406.           ___________________________________________________________________
  16407.  
  16408.  
  16409.           REN / RENAME                                             (Enhanced)
  16410.  
  16411.           Purpose:    Rename files or subdirectories.
  16412.  
  16413.           Format:     REN [/N /P /Q /S] old_name... new_name
  16414.                            or
  16415.                       RENAME [/N /P /Q /S] old_name... new_name
  16416.  
  16417.                       old_name:  Original name of the file(s) or
  16418.                       subdirectory.
  16419.                       new_name:  New name to use or new path on the same
  16420.                       drive.
  16421.  
  16422.                       /N(othing)                  /Q(uiet)
  16423.                       /P(rompt)                   /S(ubdirectory)
  16424.  
  16425.                       See Also: COPY and MOVE.
  16426.  
  16427.           Usage:      REN and RENAME are synonyms.  You may use either one.
  16428.  
  16429.                       REN lets you change the name of a file or a
  16430.                       subdirectory.  You can also use REN to move one or more
  16431.                       files to a new subdirectory on the same drive.  (If you
  16432.                       want to move files to a different drive, use MOVE.)
  16433.  
  16434.                       In its simplest form, you simply give REN the old_name
  16435.                       of an existing file or subdirectory and then a
  16436.                       new_name.  The new_name must not already exist -- you
  16437.                       can't give two files the same name (unless they are in
  16438.                       different directories).  The first example renames the
  16439.                       file MEMO.TXT to OFFICE.TXT.  The second example
  16440.                       changes the name of the \WORDPROC directory to \WP:
  16441.  
  16442.                            c:\> rename memo.txt office.txt
  16443.                            c:\> rename \wordproc \wp
  16444.  
  16445.                       You can also use REN to rename a group of files that
  16446.                       you specify with wildcards, as multiple files, or in an
  16447.                       include list.  When you do, the new_name must use one
  16448.                       or more wildcards to show what part of each filename to
  16449.                       change.  Both of the next two examples change the
  16450.                       extensions of multiple files to .SAV:
  16451.  
  16452.                            c:\> ren config.sys autoexec.bat 4start.btm *.sav
  16453.                            c:\> ren *.txt *.sav
  16454.  
  16455.                       REN can move one or more files to a different
  16456.                       subdirectory on the same drive.  When it is used for
  16457.  
  16458.  
  16459.           ___________________________________________________________________
  16460.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  281
  16461.  
  16462.                          CHAPTER 8 / COMMAND REFERENCE GUIDE  /  REN / RENAME
  16463.           ___________________________________________________________________
  16464.  
  16465.  
  16466.                       this purpose, REN requires one or more filenames for
  16467.                       the old_name and a directory name for the new_name:
  16468.  
  16469.                            c:\> ren memo.txt c:\wp\memos\
  16470.                            c:\> ren oct.dat nov.dat c:\data\save\
  16471.  
  16472.                       The final backslash in the last two examples is
  16473.                       optional.  If you use it, you force REN to recognize
  16474.                       the last argument as the name of a directory, not a
  16475.                       file.  If you accidentally mistype the directory name,
  16476.                       REN will report an error instead of renaming your files
  16477.                       in a way that you didn't intend.
  16478.  
  16479.                       Finally, REN can move files to a new directory and
  16480.                       change their name at the same time if you specify both
  16481.                       a path and file name for new_name.  In this example,
  16482.                       the files are renamed with an extension of .SAV as they
  16483.                       are moved to a new directory:
  16484.  
  16485.                            c:\> ren *.dat c:\data\save\*.sav
  16486.  
  16487.                       When new_name refers to a file or files (rather than a
  16488.                       directory), the file(s) must not already exist.  Also,
  16489.                       you cannot rename a subdirectory to a new location on
  16490.                       the directory tree.
  16491.  
  16492.                   ##  REN does not change a file's attributes.  The new_name
  16493.                       file(s) will have the same attributes as old_name.
  16494.  
  16495.           Options:    /N(othing):  Do everything except actually rename the
  16496.                       file(s).  This option is useful for testing what a REN
  16497.                       command will actually do.
  16498.  
  16499.                       /P(rompt):  Ask the user to confirm each move by
  16500.                       pressing Y or N.  An N response will skip that
  16501.                       particular file.
  16502.  
  16503.                       /Q(uiet):  Don't display filenames as they are renamed.
  16504.                       This option is most often used in batch files.
  16505.  
  16506.                       /S(ubdirectory):  Normally, you can rename a
  16507.                       subdirectory only if you do not use any wildcards in
  16508.                       the old_name.  This prevents subdirectories from being
  16509.                       renamed inadvertently when a group of files is being
  16510.                       renamed with wildcards.  /S will let you rename a
  16511.                       subdirectory even when you use wildcards.
  16512.  
  16513.  
  16514.  
  16515.  
  16516.           ___________________________________________________________________
  16517.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  282
  16518.  
  16519.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  RETURN
  16520.           ___________________________________________________________________
  16521.  
  16522.  
  16523.           RETURN                                                        (New)
  16524.  
  16525.           Purpose:    Return from a GOSUB (subroutine) in a batch file.
  16526.  
  16527.           Format:     RETURN
  16528.  
  16529.                       See also: GOSUB.
  16530.  
  16531.           ## Usage:   4DOS allows subroutines in batch files.  A subroutine
  16532.                       begins with a label (a colon followed by a word) and
  16533.                       ends with a RETURN command.  The subroutine is invoked
  16534.                       with a GOSUB command from another part of the batch
  16535.                       file.  The RETURN command ends a subroutine; execution
  16536.                       of the batch file will continue on the line following
  16537.                       the original GOSUB.
  16538.  
  16539.                       The following batch file fragment calls a subroutine
  16540.                       which displays the current directory:
  16541.  
  16542.                            echo Calling a subroutine
  16543.                            gosub subr1
  16544.                            echo Returned from the subroutine
  16545.                            quit
  16546.  
  16547.                            :subr1
  16548.                            dir /a/w
  16549.                            return
  16550.  
  16551.  
  16552.  
  16553.  
  16554.  
  16555.  
  16556.  
  16557.  
  16558.  
  16559.  
  16560.  
  16561.  
  16562.  
  16563.  
  16564.  
  16565.  
  16566.  
  16567.  
  16568.  
  16569.  
  16570.  
  16571.  
  16572.  
  16573.           ___________________________________________________________________
  16574.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  283
  16575.  
  16576.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SCREEN
  16577.           ___________________________________________________________________
  16578.  
  16579.  
  16580.           SCREEN                                                        (New)
  16581.  
  16582.           Purpose:    Position the cursor on the screen and optionally
  16583.                       display a message.
  16584.  
  16585.           Format:     SCREEN row column [message]
  16586.  
  16587.                       row:  The new row location for the cursor.
  16588.                       column:  The new column location for the cursor.
  16589.                       message:  Optional text to display at the new cursor
  16590.                       location.
  16591.  
  16592.                       See also: ECHO, SCRPUT, TEXT, and VSCRPUT.
  16593.  
  16594.           Usage:      SCREEN allows you to create attractive screen displays
  16595.                       in batch files.  You use it to specify where a message
  16596.                       will appear on the screen.  You can use SCREEN to
  16597.                       create menu displays, logos, etc.  The following batch
  16598.                       file fragment displays a menu:
  16599.  
  16600.                            @echo off ^ cls
  16601.                            screen 3 10  Select a number from 1 to 4:
  16602.                            screen 6 20  1 - Word Processing
  16603.                            screen 7 20  2 - Spreadsheet
  16604.                            screen 8 20  3 - Telecommunications
  16605.                            screen 9 20  4 - Quit
  16606.  
  16607.                       SCREEN does not change the screen colors.  If you have
  16608.                       ANSI.SYS installed and have set colors with CLS or
  16609.                       COLOR, those colors will be used for the display.  To
  16610.                       display text in specific colors, use SCRPUT or VSCRPUT.
  16611.  
  16612.                       The row and column values are zero-based, so on a
  16613.                       standard 25 line by 80 column display, valid rows are 0
  16614.                       - 24 and valid columns are 0 - 79.
  16615.  
  16616.                       SCREEN checks for a valid row and column, and displays
  16617.                       a "Usage" error message if either value is out of
  16618.                       range.
  16619.  
  16620.  
  16621.  
  16622.  
  16623.  
  16624.  
  16625.  
  16626.  
  16627.  
  16628.  
  16629.  
  16630.           ___________________________________________________________________
  16631.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  284
  16632.  
  16633.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SCRPUT
  16634.           ___________________________________________________________________
  16635.  
  16636.  
  16637.           SCRPUT                                                        (New)
  16638.  
  16639.           Purpose:    Position the cursor on the screen and display a message
  16640.                       in color.
  16641.  
  16642.           Format:     SCRPUT row col [BRIght] [BLInk] fg ON bg text
  16643.  
  16644.                       row:  Starting row
  16645.                       col:  Starting column
  16646.                       fg:  Foreground character color
  16647.                       bg:  Background character color
  16648.                       text:  The text to display
  16649.  
  16650.                       The available colors are:
  16651.  
  16652.                         Black         Blue          Green         Red
  16653.                         Magenta       Cyan          Yellow        White
  16654.  
  16655.                       See also: CLS, ECHO, SCREEN, TEXT, and VSCRPUT.
  16656.  
  16657.           Usage:      SCRPUT allows you to create attractive screen displays
  16658.                       in batch files.  You use it to specify where a message
  16659.                       will appear on the screen and what colors will be used
  16660.                       to display the message text.  You can use SCRPUT to
  16661.                       create menu displays, logos, etc.
  16662.  
  16663.                       SCRPUT works like SCREEN, but allows you to specify the
  16664.                       display colors.  It writes directly to the screen and
  16665.                       does not require an ANSI driver.
  16666.  
  16667.                       Only the first three characters of the color name and
  16668.                       the attributes BRIGHT and BLINK are required.  The row
  16669.                       and column are zero-based, so on a standard 25 line by
  16670.                       80 column display, valid rows are 0 - 24 and valid
  16671.                       columns are 0 - 79.
  16672.  
  16673.                       The following batch file fragment displays a menu in
  16674.                       color (each  SCRPUT command should be entered on one
  16675.                       line):
  16676.  
  16677.                            @echo off ^ cls white on blue
  16678.                            scrput 3 10 bri whi on blue Select a number from
  16679.                              1 to 4:
  16680.                            scrput 6 20 bri red on blue 1 - Word Processing
  16681.                            scrput 7 20 bri yel on blue 2 - Spreadsheet
  16682.                            scrput 8 20 bri gre on blue 3 -
  16683.                            Telecommunications
  16684.                            scrput 9 20 bri mag on blue 4 - Quit
  16685.  
  16686.  
  16687.           ___________________________________________________________________
  16688.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  285
  16689.  
  16690.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SELECT
  16691.           ___________________________________________________________________
  16692.  
  16693.  
  16694.           SELECT                                                        (New)
  16695.  
  16696.           Purpose:    Interactively select files for a command.
  16697.  
  16698.           Format:     SELECT [/A[:][-]rhsda /C /D /O[:][-]adeginsu]
  16699.                            [command] ... (files...)...
  16700.  
  16701.                       command:  The command to execute with the selected
  16702.                       files.
  16703.                       files:  The files from which to select.  File names may
  16704.                       be enclosed in either parentheses or square brackets.
  16705.                       The difference is explained below.
  16706.  
  16707.                       /A(ttribute)                     /D(isable
  16708.                       colorization)
  16709.                       /C(ase -- use upper case)        /O(rder)
  16710.  
  16711.           Usage:      SELECT allows you to select files for internal and
  16712.                       external commands by using a full-screen "point and
  16713.                       shoot" display.  You can have SELECT execute a command
  16714.                       once for each file you select, or have it create a list
  16715.                       of files for a command to work with.  The command can
  16716.                       be a 4DOS internal command or alias, an external
  16717.                       command, or a batch file.
  16718.  
  16719.                       If you use parentheses around the files, SELECT
  16720.                       executes the command once for each file you have
  16721.                       selected.  During each execution, one of the selected
  16722.                       files is passed to the command as an argument.  If you
  16723.                       use square brackets around files, the SELECTed files
  16724.                       are combined into a single list, separated by spaces.
  16725.                       The command is then executed once with the entire list
  16726.                       presented as its command-line arguments.
  16727.  
  16728.                       SELECT uses the cursor up, cursor down, PgUp, and PgDn
  16729.                       keys to scroll through the file list.  Use the + key or
  16730.                       the spacebar to select a file (or unselect a marked
  16731.                       file), and the - key to unselect a file.  The * key
  16732.                       will reverse all of the current marks (excluding
  16733.                       subdirectories), and the / key will unmark everything.
  16734.                       After marking the files, press Enter to execute the
  16735.                       command.
  16736.  
  16737.                       You can select a single file by moving the scroll bar
  16738.                       to the filename and pressing Enter without marking any
  16739.                       other files.
  16740.  
  16741.  
  16742.  
  16743.  
  16744.           ___________________________________________________________________
  16745.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  286
  16746.  
  16747.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SELECT
  16748.           ___________________________________________________________________
  16749.  
  16750.  
  16751.                       To skip the files listed in the current display and go
  16752.                       on to the next file specification inside the
  16753.                       parentheses or brackets (if any), press the Escape key.
  16754.                       To cancel the current SELECT command entirely, press
  16755.                       Ctrl-C or Ctrl-Break.
  16756.  
  16757.                       In the simplest form of SELECT, you merely specify the
  16758.                       command and then the list of files from which you will
  16759.                       make your selection(s).  For example:
  16760.  
  16761.                            c:\> select copy (*.com *.exe) a:\
  16762.  
  16763.                       will let you select from among the .COM and .EXE files
  16764.                       on the current drive.  It will then invoke the COPY
  16765.                       command to copy each file you select to drive A:.  You
  16766.                       will be able to select first from a list of all .COM
  16767.                       files in the current directory, and then from a list of
  16768.                       all .EXE files.
  16769.  
  16770.                       If you want to select from a list of all the .COM and
  16771.                       .EXE files mixed together, create an include list
  16772.                       inside the parentheses by inserting a semi-colon (see
  16773.                       page 74 for information on include lists):
  16774.  
  16775.                            c:\> select copy (*.com;*.exe) a:\
  16776.  
  16777.                       Finally, if you want the SELECT command to send a
  16778.                       single list of files to COPY, instead of invoking COPY
  16779.                       once for each file you select, put the file names in
  16780.                       square brackets instead of parentheses:
  16781.  
  16782.                            c:\> select copy [*.com;*.exe] a:\
  16783.  
  16784.                       If you use brackets, you have to be sure that the
  16785.                       resulting command (the word COPY, the list of files,
  16786.                       and the destination drive in this example) is no more
  16787.                       than 127 characters long for external commands and no
  16788.                       more than 255 characters long for internal 4DOS
  16789.                       commands.  The current line length is displayed by
  16790.                       SELECT while you are marking files to help you to
  16791.                       conform to these limits.
  16792.  
  16793.                       The parentheses or brackets enclosing the file name(s)
  16794.                       can appear anywhere within the command; SELECT assumes
  16795.                       that the first set of parentheses or brackets it finds
  16796.                       is the one containing the list of files from which you
  16797.                       wish to make your selection.
  16798.  
  16799.  
  16800.  
  16801.           ___________________________________________________________________
  16802.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  287
  16803.  
  16804.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SELECT
  16805.           ___________________________________________________________________
  16806.  
  16807.  
  16808.                   ##  If you don't specify a command, the selected
  16809.                       filename(s) will become the command.  For example, this
  16810.                       command defines an alias called UTILS that selects from
  16811.                       the executable files in the directory C:\UTIL, and then
  16812.                       executes them in the order marked (enter the alias on
  16813.                       one line):
  16814.  
  16815.                            c:\> alias utils select
  16816.                                  (c:\util\*.com;*.exe;*.btm;*.bat)
  16817.  
  16818.                   ##  If you want to use filename completion (see page 59) to
  16819.                       enter the filenames inside the parentheses, type a
  16820.                       space after the opening parenthesis.  Otherwise the
  16821.                       command line editor will treat the open parenthesis as
  16822.                       the first character of the filename.
  16823.  
  16824.                   ##  You can set the default colors used by SELECT (and
  16825.                       LIST) using the ListColors directive in 4DOS.INI (see
  16826.                       page 130).  If ListColors is not used, the default
  16827.                       colors will be set by the StdColors directive (page
  16828.                       131) or by the last CLS or COLOR command.
  16829.  
  16830.                   ##  If you have an ANSI driver loaded, you can display the
  16831.                       filenames in color by setting the COLORDIR environment
  16832.                       variable (the same colors will be used by the DIR
  16833.                       command).  The format for COLORDIR is:
  16834.  
  16835.                            ext ... :[BRIght][BLInk] fg [ON bg]; ...
  16836.  
  16837.                       where ext is the file extension, or one of the
  16838.                       following file attributes:
  16839.  
  16840.                            DIRS      directory
  16841.                            RDONLY    read-only file
  16842.                            HIDDEN    hidden file
  16843.                            SYSTEM    system file
  16844.                            ARCHIVE   file modified since last backup.
  16845.  
  16846.                       For example, to display the .COM and .EXE files in red,
  16847.                       the .C and .ASM files in bright cyan, and the read-only
  16848.                       files in blinking green (enter this on one line):
  16849.  
  16850.                            c:\> set colordir=com exe:red; c asm:bright cyan;
  16851.                                 rdonly:blink green
  16852.  
  16853.                       If you don't specify a background color, SELECT will
  16854.                       use the current screen background color from the
  16855.                       ListColors or StdColors directive or the last CLS or
  16856.  
  16857.  
  16858.           ___________________________________________________________________
  16859.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  288
  16860.  
  16861.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SELECT
  16862.           ___________________________________________________________________
  16863.  
  16864.  
  16865.                       COLOR command (as described above).  COLORDIR will not
  16866.                       work properly unless you have an ANSI driver loaded.
  16867.  
  16868.                       You can disable directory colorization within SELECT
  16869.                       with the /D option.
  16870.  
  16871.                   ##  Extended wildcards (for example "BA[KXC]" for .BAK,
  16872.                       .BAX, and .BAC files) can be used in directory color
  16873.                       specifications.  See page 71 for more information on
  16874.                       extended wildcards.
  16875.  
  16876.                   ##  When sorting file names and extensions for the SELECT
  16877.                       display, 4DOS normally assumes that sequences of digits
  16878.                       should be sorted numerically (for example, the file
  16879.                       DRAW2 would come before DRAW03 because 2 is numerically
  16880.                       larger than 03), rather than strictly alphabetically
  16881.                       (where DRAW2 would come second because "2" is more than
  16882.                       "0").  You can defeat this behavior and force a strict
  16883.                       alphabetic sort with the /O:a option.
  16884.  
  16885.                   ##  You may need to increase 4DOS's internal stack size
  16886.                       using the StackSize directive in 4DOS.INI if you use
  16887.                       extremely complex combinations of commands like EXCEPT,
  16888.                       FOR, GLOBAL, IF, and SELECT on the same command line,
  16889.                       or use complex combinations of these commands in nested
  16890.                       batch files or nested GOSUBs.  See the StackSize
  16891.                       directive on page 137 for more information.
  16892.  
  16893.           Options:##  /A(ttribute):  Display only those files that have the
  16894.                       specified attribute set.  Preceding the attribute
  16895.                       character with a minus [-] will display those files
  16896.                       that DON'T have that attribute set.  Attributes can
  16897.                       also be combined.  The attributes are:
  16898.  
  16899.                            R    Read-only         D    Subdirectory
  16900.                            H    Hidden            A    Archive
  16901.                            S    System
  16902.  
  16903.                       /C(ase):  Display filenames in the traditional upper
  16904.                       case format; also see SETDOS /U and the UpperCase
  16905.                       directive in 4DOS.INI.
  16906.  
  16907.                   ##  /D(isable colorization):  Temporarily turn off
  16908.                       directory colorization within SELECT.
  16909.  
  16910.                       /O(rder):  Set the sort order for the files.  The order
  16911.                       can be any combination of the following options:
  16912.                            -    Reverse the sort order for the next option
  16913.  
  16914.  
  16915.           ___________________________________________________________________
  16916.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  289
  16917.  
  16918.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SELECT
  16919.           ___________________________________________________________________
  16920.  
  16921.  
  16922.                            a    Sort names and extensions in standard ASCII
  16923.                                 order, rather than sorting numerically when
  16924.                                 digits are included in the name or extension
  16925.                            d    Sort by date and time (oldest first)
  16926.                            e    Sort by extension
  16927.                            g    Group subdirectories together
  16928.                            i    Sort by the file description
  16929.                            n    Sort by filename (this is the default)
  16930.                            r    Reverse the sort order for all options
  16931.                            s    Sort by size
  16932.                            u    Unsorted
  16933.  
  16934.  
  16935.  
  16936.  
  16937.  
  16938.  
  16939.  
  16940.  
  16941.  
  16942.  
  16943.  
  16944.  
  16945.  
  16946.  
  16947.  
  16948.  
  16949.  
  16950.  
  16951.  
  16952.  
  16953.  
  16954.  
  16955.  
  16956.  
  16957.  
  16958.  
  16959.  
  16960.  
  16961.  
  16962.  
  16963.  
  16964.  
  16965.  
  16966.  
  16967.  
  16968.  
  16969.  
  16970.  
  16971.  
  16972.           ___________________________________________________________________
  16973.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  290
  16974.  
  16975.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SET
  16976.           ___________________________________________________________________
  16977.  
  16978.  
  16979.           SET                                                      (Enhanced)
  16980.  
  16981.           Purpose:    Display, create, modify, or delete environment
  16982.                       variables.
  16983.  
  16984.           Format:     SET [/M /P /R filename...] [name[=][value]]
  16985.  
  16986.                       filename:  The name of a file containing variable
  16987.                       definitions.
  16988.                       name:  The name of the environment variable to define
  16989.                       or modify.
  16990.                       value:  The new value for the variable.
  16991.  
  16992.                       /M(aster)                   /R(ead from file)
  16993.                       /P(ause)
  16994.  
  16995.                       See also: UNSET and ESET.
  16996.  
  16997.           Usage:      Every program and command inherits an environment,
  16998.                       which is a list of variable names, each of which is
  16999.                       followed by an equal sign and some text.  Many programs
  17000.                       use entries in the environment to modify their own
  17001.                       actions.  4DOS itself uses several environment
  17002.                       variables (see page 115).  See page 78 for more
  17003.                       information on the environment.
  17004.  
  17005.                       If you simply type the SET command with no options or
  17006.                       arguments, it will display all the names and values
  17007.                       currently stored in the environment.  Typically, you
  17008.                       will see an entry called COMSPEC, an entry called PATH,
  17009.                       an entry called CMDLINE, and whatever other environment
  17010.                       variables you and your programs have established:
  17011.  
  17012.                            c:\> set
  17013.                            COMSPEC=C:\4DOS.COM
  17014.                            PATH=C:\;C:\DOS;C:\UTIL
  17015.                            CMDLINE=E:\UTIL\MAPMEM.EXE
  17016.  
  17017.                       To add a variable to the environment, type SET plus the
  17018.                       variable name, an equal sign, and the text:
  17019.  
  17020.                            c:\> set mine=c:\finance\myfiles
  17021.  
  17022.                       4DOS will convert the variable name to upper case but
  17023.                       leave the text after the equal sign just as you entered
  17024.                       it.  If the variable already exists, its value will be
  17025.                       replaced with the new text that you entered.
  17026.  
  17027.  
  17028.  
  17029.           ___________________________________________________________________
  17030.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  291
  17031.  
  17032.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SET
  17033.           ___________________________________________________________________
  17034.  
  17035.  
  17036.                       Normally you should not put a space on either side of
  17037.                       the equal sign.  A space before the equal sign will
  17038.                       become part of the name; a space after the equal sign
  17039.                       will become part of the value.
  17040.  
  17041.                       To display the contents of a single variable, type SET
  17042.                       plus the variable name:
  17043.  
  17044.                            c:\> set mine
  17045.  
  17046.                       You can edit environment variables with the ESET
  17047.                       command.  To remove variables from the environment, use
  17048.                       UNSET, or type SET plus a variable name and an equal
  17049.                       sign:
  17050.  
  17051.                            c:\> set mine=
  17052.  
  17053.                       4DOS limits the variable name to a maximum of 80
  17054.                       characters, and the name plus the value to a maximum of
  17055.                       255 characters.
  17056.  
  17057.                   ##  Unless you use /M, SET only affects the environment of
  17058.                       the current command processor and the programs it
  17059.                       executes.  If you EXIT to a parent command processor,
  17060.                       the original environment will be unchanged.
  17061.  
  17062.                       The size of the environment is specified by the
  17063.                       Environment and EnvFree directives in 4DOS.INI (see
  17064.                       page 124) or by the /E: startup switch (see page 111).
  17065.  
  17066.           Options:##  /M(aster):  Display or modify the master environment
  17067.                       rather than the local environment.  This option only
  17068.                       makes sense in a secondary command processor.
  17069.  
  17070.                       /P(ause):  Pause after displaying each page of
  17071.                       environment entries.  Press Ctrl-C to quit, or any
  17072.                       other key to display the next page.
  17073.  
  17074.                   ##  /R(ead):  Read environment variables from a file.  This
  17075.                       is much faster than loading variables from a batch file
  17076.                       with multiple SET commands.  The file is in the same
  17077.                       format as the SET display, so SET /R can accept as
  17078.                       input a file generated by redirecting SET output.  For
  17079.                       example, the following commands will save the
  17080.                       environment variables to a file, and then reload them
  17081.                       from that file:
  17082.  
  17083.                                 set > varlist
  17084.  
  17085.  
  17086.           ___________________________________________________________________
  17087.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  292
  17088.  
  17089.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SET
  17090.           ___________________________________________________________________
  17091.  
  17092.  
  17093.                                 set /r varlist
  17094.  
  17095.                       You can load variables from multiple files by listing
  17096.                       the filenames individually after the /R.  You can add
  17097.                       comments to a variable file by starting the comment
  17098.                       line with a colon [:].
  17099.  
  17100.  
  17101.  
  17102.  
  17103.  
  17104.  
  17105.  
  17106.  
  17107.  
  17108.  
  17109.  
  17110.  
  17111.  
  17112.  
  17113.  
  17114.  
  17115.  
  17116.  
  17117.  
  17118.  
  17119.  
  17120.  
  17121.  
  17122.  
  17123.  
  17124.  
  17125.  
  17126.  
  17127.  
  17128.  
  17129.  
  17130.  
  17131.  
  17132.  
  17133.  
  17134.  
  17135.  
  17136.  
  17137.  
  17138.  
  17139.  
  17140.  
  17141.  
  17142.  
  17143.           ___________________________________________________________________
  17144.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  293
  17145.  
  17146.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SETDOS
  17147.           ___________________________________________________________________
  17148.  
  17149.  
  17150.           SETDOS                                                        (New)
  17151.  
  17152.           Purpose:    Display or set the 4DOS configuration.
  17153.  
  17154.           Format:     SETDOS [/A? /C? /E? /I+|- command /L? /M? /N? /R? /S?:?
  17155.                            /U? /V?]
  17156.  
  17157.                       /A(NSI)                     /N(o clobber)
  17158.                       /C(ompound)                 /R(ows)
  17159.                       /E(scape character)         /S(hape of cursor)
  17160.                       /I(nternal commands)        /U(pper case)
  17161.                       /L(ine)                     /V(erbose)
  17162.                       /M(ode for editing)
  17163.  
  17164.           Usage:      SETDOS allows you to customize certain aspects of 4DOS
  17165.                       to suit your personal tastes or the configuration of
  17166.                       your system.  Each of these options is described below.
  17167.  
  17168.                       You can display the value of all SETDOS options by
  17169.                       entering the SETDOS command with no parameters.
  17170.  
  17171.                       Most of the SETDOS options can be initialized when 4DOS
  17172.                       starts through directives in the 4DOS.INI file (see
  17173.                       page 127).  The name of the corresponding directive is
  17174.                       listed in square brackets [ ] with each option;  if
  17175.                       none is listed, that option cannot be set from the
  17176.                       4DOS.INI file.  You can also define the SETDOS options
  17177.                       in your AUTOEXEC.BAT or 4START file, in aliases, or at
  17178.                       the command line.
  17179.  
  17180.                       Secondary shells automatically inherit most
  17181.                       configuration settings currently in effect in the
  17182.                       previous shell.  If values have been changed by SETDOS
  17183.                       since 4DOS started, the new values will be passed to
  17184.                       the secondary shell.  For details on inheritance of
  17185.                       SETDOS values by secondary shells and their
  17186.                       relationship to 4DOS.INI, see page 120.
  17187.  
  17188.                       SETDOS /I settings are not inherited by secondary
  17189.                       shells.  If you want to use SETDOS /I- to disable
  17190.                       commands in all shells, place the SETDOS command(s) in
  17191.                       your 4START file (see page 117), which is executed when
  17192.                       any shell starts.
  17193.  
  17194.                       Many of the options below are marked with## .  If you
  17195.                       are a new user, skip these and read the /M, /S, and /U
  17196.                       options, which are more common.
  17197.  
  17198.  
  17199.  
  17200.           ___________________________________________________________________
  17201.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  294
  17202.  
  17203.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SETDOS
  17204.           ___________________________________________________________________
  17205.  
  17206.  
  17207.           Options:##  /A(NSI)  [ANSI]:  The ANSI option determines whether
  17208.                       4DOS will attempt to use ANSI escape sequences for the
  17209.                       CLS and COLOR commands.  4DOS normally determines this
  17210.                       itself, but if you are using a non-standard ANSI driver
  17211.                       or your loading sequence is unusual, you may need to
  17212.                       explicitly inform 4DOS.  /A0 allows 4DOS to determine
  17213.                       whether an ANSI driver is installed (the default).
  17214.                       /A1 forces 4DOS to assume an ANSI driver is installed.
  17215.                       /A2 forces 4DOS to assume an ANSI driver is not
  17216.                       installed.
  17217.  
  17218.                   ##  /C(ompound character)  [CommandSep]:  The COMPOUND
  17219.                       option sets the character used for separating multiple
  17220.                       commands on the same line.  The default is the caret
  17221.                       [^].  You cannot use any of the redirection characters
  17222.                       (| > <), or any of the whitespace characters (blank,
  17223.                       tab, comma, or equal sign) as the command separator.
  17224.                       This example changes the COMPOUND character to a tilde
  17225.                       [~]:
  17226.  
  17227.                            c:\> setdos /c~
  17228.  
  17229.                   ##  /E(scape character)  [EscapeChar]:  The ESCAPE option
  17230.                       sets the character used to suppress the normal meaning
  17231.                       of the following character.  Any character following
  17232.                       the escape character will be passed unmodified to the
  17233.                       command line.  For example, you could include a
  17234.                       redirection character such as > as part of a command-
  17235.                       line argument if the character was preceded by the
  17236.                       escape character.  The default escape character is
  17237.                       Ctrl-X (ASCII 24; appears on screen as an up-arrow).
  17238.                       You cannot use any of the redirection characters (| >
  17239.                       <) or the whitespace characters (blank, tab, comma, or
  17240.                       equal sign) as the escape character.  Certain
  17241.                       characters (b, e, f, n, r, and t)  have special
  17242.                       meanings when immediately preceded by the escape
  17243.                       character.  See page 93 for additional details.
  17244.  
  17245.                   ##  /I(nternal):  The INTERNAL option allows you to disable
  17246.                       or enable internal 4DOS commands.  To disable a
  17247.                       command, precede the command name with a minus [-].  To
  17248.                       re-enable a command, precede it with a plus [+].  For
  17249.                       example, to disable the internal LIST command to force
  17250.                       4DOS to use an external command:
  17251.  
  17252.                            c:\> setdos /i-list
  17253.  
  17254.  
  17255.  
  17256.  
  17257.           ___________________________________________________________________
  17258.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  295
  17259.  
  17260.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SETDOS
  17261.           ___________________________________________________________________
  17262.  
  17263.  
  17264.                   ##  /L(ine)  [LineInput]:  The LINE option controls how
  17265.                       4DOS gets its input from the command line.  /L0 tells
  17266.                       4DOS to use character input (the default).  /L1 tells
  17267.                       4DOS to use line input (via DOS  service INT 21h
  17268.                       function 0Ah, like COMMAND.COM).  /L1 will disable
  17269.                       command line editing, history recall, and filename
  17270.                       completion; it should only be used if it is needed for
  17271.                       compatibility with a specific program.  If you have a
  17272.                       program that requires line input, you can use the
  17273.                       following line in an alias or batch file to change the
  17274.                       line input option just for that single program:
  17275.  
  17276.                            setdos /L1 ^ program %& ^ setdos /L0
  17277.  
  17278.                       See the file APPNOTES.DOC for information on programs
  17279.                       which require this option.
  17280.  
  17281.                       /M(ode)  [EditMode]:  The MODE option controls the
  17282.                       initial line editing mode.  /M0 forces 4DOS to start
  17283.                       editing in overstrike mode (the default).  /M1 forces
  17284.                       4DOS to start editing in insert mode.
  17285.  
  17286.                   ##  /N(o clobber)  [NoClobber]:  The NOCLOBBER option
  17287.                       controls output redirection (see page 65).  /N0 means
  17288.                       existing files will be overwritten by simple
  17289.                       redirection (with >) and that appending (with >>) does
  17290.                       not require the file to exist already.  This is the
  17291.                       default.  /N1 means existing files may not be
  17292.                       overwritten by simple output redirection, and that when
  17293.                       appending the output file must exist.  A /N1 setting
  17294.                       can be overridden with the [!] character.  If you use
  17295.                       /N1, you may have problems with a few unusual programs
  17296.                       that shell to DOS to run a command with redirection,
  17297.                       and expect to be able to overwrite an existing file.
  17298.  
  17299.                   ##  /R(ows)  [ScreenRows]:  The ROWS option sets the number
  17300.                       of screen rows used by the video display.  Normally
  17301.                       4DOS detects the screen size, but if you have a non-
  17302.                       standard display you may need to set it explicitly.
  17303.                       This option does not affect screen scrolling (that is
  17304.                       controlled by your video BIOS or ANSI.SYS); it is used
  17305.                       only for LIST, SELECT, the paged output options (i.e.,
  17306.                       TYPE /P), and error checking in the screen output
  17307.                       commands.
  17308.  
  17309.                       /S(hape)  [CursorOver, CursorIns]:  The SHAPE option
  17310.                       sets the 4DOS cursor shape.  The format is /So:i where
  17311.                       o is the cursor size for overstrike mode, i the cursor
  17312.  
  17313.  
  17314.           ___________________________________________________________________
  17315.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  296
  17316.  
  17317.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SETDOS
  17318.           ___________________________________________________________________
  17319.  
  17320.  
  17321.                       size for insert mode.  The size is entered as a
  17322.                       percentage of the total character height.  The default
  17323.                       values are 10:100 (an underscore cursor for overstrike
  17324.                       mode, and a block cursor for insert mode).  Because of
  17325.                       the way video BIOSes remap the cursor shape, you may
  17326.                       not get a smooth progression in the cursor size from 0%
  17327.                       - 100%.  To disable the cursor, enter /S0:0.
  17328.  
  17329.                       /U(pper)  [UpperCase]:  The UPPER option controls the
  17330.                       default case (upper or lower) for filenames displayed
  17331.                       by 4DOS internal commands like COPY and DIR.  /U0
  17332.                       displays file names in lower case (the default).  /U1
  17333.                       displays file names in the traditional upper case.
  17334.  
  17335.                   ##  /V(erbose)  [BatchEcho]:  The VERBOSE option controls
  17336.                       the default for command echoing in batch files.  /V0
  17337.                       disables echoing of batch file commands unless ECHO is
  17338.                       explicitly set ON.  /V1 enables echoing of batch file
  17339.                       commands unless ECHO is explicitly set OFF.  /V2 forces
  17340.                       echoing of all batch file commands, even if ECHO is set
  17341.                       OFF or the line begins with an "@".  /V2 is intended
  17342.                       for debugging, and can be set with SETDOS but cannot be
  17343.                       set with the BatchEcho directive in 4DOS.INI.  /V1 is
  17344.                       the default.
  17345.  
  17346.  
  17347.  
  17348.  
  17349.  
  17350.  
  17351.  
  17352.  
  17353.  
  17354.  
  17355.  
  17356.  
  17357.  
  17358.  
  17359.  
  17360.  
  17361.  
  17362.  
  17363.  
  17364.  
  17365.  
  17366.  
  17367.  
  17368.  
  17369.  
  17370.  
  17371.           ___________________________________________________________________
  17372.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  297
  17373.  
  17374.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SETLOCAL
  17375.           ___________________________________________________________________
  17376.  
  17377.  
  17378.           SETLOCAL                                                      (New)
  17379.  
  17380.           Purpose:    Save a copy of the current disk drive, directory,
  17381.                       environment, and alias list.
  17382.  
  17383.           Format:     SETLOCAL
  17384.  
  17385.                       See also: ENDLOCAL.
  17386.  
  17387.           Usage:      SETLOCAL is used in batch files to save the default
  17388.                       disk drive and directory, the environment, and the
  17389.                       alias list to a reserved block of memory.  You can then
  17390.                       change their values and later restore the original
  17391.                       values with the ENDLOCAL command.
  17392.  
  17393.                       For example, this batch file fragment saves everything,
  17394.                       changes the disk and directory, modifies some
  17395.                       variables, runs a program, and then restores the
  17396.                       original values:
  17397.  
  17398.                            setlocal
  17399.                            cdd d:\test
  17400.                            set path=c:\;c:\dos;c:\util
  17401.                            set lib=d:\lib
  17402.                            rem run some program here
  17403.                            endlocal
  17404.  
  17405.                       SETLOCAL and ENDLOCAL are not nestable within a batch
  17406.                       file.  However, you can have multiple SETLOCAL /
  17407.                       ENDLOCAL pairs within a batch file, and nested batch
  17408.                       files can each have their own SETLOCAL / ENDLOCAL.  You
  17409.                       cannot use SETLOCAL in an alias or at the command line.
  17410.  
  17411.                   ##  4DOS automatically performs an ENDLOCAL at the end of a
  17412.                       batch file if you forget to do so.  If you invoke one
  17413.                       batch file from another without using CALL, the first
  17414.                       batch file is terminated, and an automatic ENDLOCAL is
  17415.                       performed.  The second batch file inherits the drive,
  17416.                       directory, aliases, and environment variables as they
  17417.                       were prior to any unterminated SETLOCAL.
  17418.  
  17419.                   ##  Do not load memory-resident programs (TSRs) from a
  17420.                       batch file while SETLOCAL is in effect.  If you do,
  17421.                       when ENDLOCAL is executed and the memory used by
  17422.                       SETLOCAL is released, a "hole" will be left in memory
  17423.                       below the TSR.  This is not usually harmful, but wastes
  17424.                       memory.
  17425.  
  17426.  
  17427.  
  17428.           ___________________________________________________________________
  17429.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  298
  17430.  
  17431.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SHIFT
  17432.           ___________________________________________________________________
  17433.  
  17434.  
  17435.           SHIFT                                                    (Enhanced)
  17436.  
  17437.           Purpose:    Allows the use of more than 127 replaceable parameters
  17438.                       in a batch file.
  17439.  
  17440.           Format:     SHIFT [n]
  17441.  
  17442.           Usage:      SHIFT is provided for compatibility with older batch
  17443.                       files, where it was used to access more than 10
  17444.                       replaceable parameters.  4DOS supports 128 replaceable
  17445.                       parameters (%0 to %127), so you may not need to use
  17446.                       SHIFT for batch files running exclusively under 4DOS.
  17447.  
  17448.                       SHIFT moves each of the batch file replaceable
  17449.                       parameters n positions to the left.  The default value
  17450.                       for n is 1.  SHIFT 1 moves the parameter in %1 to
  17451.                       position %0, the parameter in %2 becomes %1, etc.  You
  17452.                       can reverse a SHIFT by giving a negative value for n
  17453.                       (i.e., after SHIFT -1, the former %0 is restored, %0
  17454.                       becomes %1, %1 becomes %2, etc.).
  17455.  
  17456.                       SHIFT also affects the 4DOS parameters %n& (command
  17457.                       line tail) and %# (number of command arguments).
  17458.  
  17459.                       For example, create a batch file called TEST.BAT:
  17460.  
  17461.                            echo %1 %2 %3 %4
  17462.                            shift
  17463.                            echo %1 %2 %3 %4
  17464.                            shift 2
  17465.                            echo %1 %2 %3 %4
  17466.                            shift -1
  17467.                            echo %1 %2 %3 %4
  17468.  
  17469.                       Executing TEST.BAT produces the following results:
  17470.  
  17471.                            c:\> test zero one two three four five six
  17472.  
  17473.                            zero one two three
  17474.                            one two three four
  17475.                            three four five six
  17476.                            two three four five
  17477.  
  17478.  
  17479.  
  17480.  
  17481.  
  17482.  
  17483.  
  17484.  
  17485.           ___________________________________________________________________
  17486.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  299
  17487.  
  17488.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  SWAPPING
  17489.           ___________________________________________________________________
  17490.  
  17491.  
  17492.           SWAPPING                                                      (New)
  17493.  
  17494.           Purpose:    Enable or disable 4DOS swapping, or display the
  17495.                       swapping state.
  17496.  
  17497.           Format:     SWAPPING [ON | OFF]
  17498.  
  17499.           ## Usage:   SWAPPING temporarily disables or enables the swapping
  17500.                       of the transient portion of 4DOS to EMS expanded
  17501.                       memory, to XMS extended memory, or to disk (see page
  17502.                       125).
  17503.  
  17504.                       Setting SWAPPING OFF is particularly useful for
  17505.                       speeding up batch files (including AUTOEXEC.BAT) when
  17506.                       4DOS is using disk swapping.  When you are running
  17507.                       several small programs from a batch file, disk swapping
  17508.                       can sometimes cause a noticeable delay.  However, if
  17509.                       you disable swapping, there will be about 88K less
  17510.                       memory available for large application programs.
  17511.  
  17512.                       The following batch file fragment disables swapping,
  17513.                       runs several programs, and then re-enables swapping:
  17514.  
  17515.                            swapping off
  17516.                            c:\util\mouse
  17517.                            c:\video\ansi.com
  17518.                            cls bright white on blue
  17519.                            c:\bin\cache.com
  17520.                            swapping on
  17521.  
  17522.                       If you enter SWAPPING with no arguments, 4DOS displays
  17523.                       the current swapping type (XMS, EMS, Disk, or None) and
  17524.                       state:
  17525.  
  17526.                            c:\> swapping
  17527.                            SWAPPING (XMS) is ON
  17528.  
  17529.                       Setting SWAPPING OFF does not close the disk swap file
  17530.                       or release any reserved EMS or XMS memory.
  17531.  
  17532.                       You may have trouble if you load memory-resident
  17533.                       programs (TSRs) with SWAPPING OFF and unload them with
  17534.                       SWAPPING ON, or vice versa.  Many TSRs expect the
  17535.                       system to be in the same state when they unload that it
  17536.                       was in when they loaded, and variation from this norm
  17537.                       may cause the TSR to unload improperly or hang your
  17538.                       system, requiring a reboot.
  17539.  
  17540.  
  17541.  
  17542.           ___________________________________________________________________
  17543.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  300
  17544.  
  17545.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TEE
  17546.           ___________________________________________________________________
  17547.  
  17548.  
  17549.           TEE                                                           (New)
  17550.  
  17551.           Purpose:    Copy standard input to both standard output and a file.
  17552.  
  17553.           Format:     TEE [/A] file...
  17554.  
  17555.                       file:  One or more files that will receive the "tee-d"
  17556.                       output.
  17557.  
  17558.                       /A(ppend)
  17559.  
  17560.                       See also: Y; redirection options (page 65).
  17561.  
  17562.           ## Usage:   Many programs get their input from "standard input" and
  17563.                       send their output to "standard output," which are
  17564.                       normally the keyboard and video display (known
  17565.                       collectively as the console or CON).  You can redirect
  17566.                       both the input and output of such programs, for
  17567.                       example, using a file either to provide the input or
  17568.                       collect the output.
  17569.  
  17570.                       TEE gets its input from standard input and sends out
  17571.                       two copies: one goes to standard output, the other to
  17572.                       the file or files that you specify.  It is most often
  17573.                       used with a redirection pipe [|] to capture
  17574.                       intermediate output before the data is altered by
  17575.                       another program or command.
  17576.  
  17577.                       For example, to search the file DOC for any lines
  17578.                       containing the string "4DOS", make a copy of the
  17579.                       matching lines in 4.DAT, sort the lines, and write them
  17580.                       to the output file 4D.DAT:
  17581.  
  17582.                            c:\> find "4DOS" doc | tee 4.dat | sort > 4d.dat
  17583.  
  17584.                       If you are typing at the keyboard to produce the input
  17585.                       for TEE, you must enter a Ctrl-Z to terminate the
  17586.                       input.
  17587.  
  17588.           Option:     /A(ppend):  Add the output to the file(s) rather than
  17589.                       overwriting them.
  17590.  
  17591.  
  17592.  
  17593.  
  17594.  
  17595.  
  17596.  
  17597.  
  17598.  
  17599.           ___________________________________________________________________
  17600.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  301
  17601.  
  17602.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TEXT
  17603.           ___________________________________________________________________
  17604.  
  17605.  
  17606.           TEXT                                                          (New)
  17607.  
  17608.           Purpose:    Display a block of text in a batch file.
  17609.  
  17610.           Format:     TEXT
  17611.                            .
  17612.                            .
  17613.                            .
  17614.                       ENDTEXT
  17615.  
  17616.                       See also: ECHO, SCREEN, SCRPUT, and VSCRPUT.
  17617.  
  17618.           Usage:      The TEXT command is useful for displaying menus or
  17619.                       multi-line messages from a batch file.  TEXT will
  17620.                       display all subsequent lines in the batch file until
  17621.                       terminated by ENDTEXT.  Both TEXT and ENDTEXT must be
  17622.                       entered as the only command on the line.
  17623.  
  17624.                       If you have an ANSI driver loaded, you can change
  17625.                       screen colors by inserting ANSI escape sequences
  17626.                       anywhere in the text block.  You can also use a CLS or
  17627.                       COLOR command to set the screen color before executing
  17628.                       the TEXT command.
  17629.  
  17630.                       The following batch file fragment displays a simple
  17631.                       menu:
  17632.  
  17633.                            @echo off ^ cls ^ screen 2 0
  17634.                            text
  17635.                            Enter one of the following:
  17636.                            1 - Spreadsheet
  17637.                            2 - Word Processing
  17638.                            3 - DOS Utilities
  17639.                            Enter your selection :
  17640.                            endtext
  17641.  
  17642.  
  17643.  
  17644.  
  17645.  
  17646.  
  17647.  
  17648.  
  17649.  
  17650.  
  17651.  
  17652.  
  17653.  
  17654.  
  17655.  
  17656.           ___________________________________________________________________
  17657.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  302
  17658.  
  17659.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TIME
  17660.           ___________________________________________________________________
  17661.  
  17662.  
  17663.           TIME                                                   (Compatible)
  17664.  
  17665.           Purpose:    Display or set the current system time.
  17666.  
  17667.           Format:     TIME [hh[:mm[:ss]]] [AM | PM]
  17668.  
  17669.                       hh   hour,  0 - 23
  17670.                       mm   minute,  0 - 59
  17671.                       ss   second,  0 - 59
  17672.  
  17673.                       See also: CHCP and DATE.
  17674.  
  17675.           Usage:      If you don't enter any parameters, TIME will display
  17676.                       the current system time and prompt you for a new time.
  17677.                       Press ENTER if you don't wish to change the time;
  17678.                       otherwise, enter the new time:
  17679.  
  17680.                            c:\> time
  17681.                            Mon  Dec 2, 1991  9:30:10
  17682.                            New time (hh:mm:ss):
  17683.  
  17684.                       TIME defaults to 24-hour format, but you can optionally
  17685.                       enter the time in 12-hour format by appending an "am"
  17686.                       or "pm" to the time you enter.
  17687.  
  17688.                       For example, to enter the time as 9:30 am:
  17689.  
  17690.                            c:\> time 9:30 am
  17691.  
  17692.                       DOS adds the system time and date to the directory
  17693.                       entry of every file you create and modify.  If you keep
  17694.                       both the time and date accurate, you will have a record
  17695.                       of when you last updated each file.
  17696.  
  17697.                       The separator used by TIME depends on the country code
  17698.                       defined in the CONFIG.SYS file or by the CHCP command.
  17699.  
  17700.  
  17701.  
  17702.  
  17703.  
  17704.  
  17705.  
  17706.  
  17707.  
  17708.  
  17709.  
  17710.  
  17711.  
  17712.  
  17713.           ___________________________________________________________________
  17714.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  303
  17715.  
  17716.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TIMER
  17717.           ___________________________________________________________________
  17718.  
  17719.  
  17720.           TIMER                                                         (New)
  17721.  
  17722.           Purpose:    TIMER is a system stopwatch.
  17723.  
  17724.           Format:     TIMER [ON] [/1 /2 /3 /S]
  17725.  
  17726.                       ON:  Force the stopwatch to restart
  17727.  
  17728.                       /1 (stopwatch #1)           /3 (stopwatch #3)
  17729.                       /2 (stopwatch #2)           /S(plit)
  17730.  
  17731.           Usage:      The TIMER command turns a system stopwatch on and off.
  17732.                       When you first run TIMER, the stopwatch starts:
  17733.  
  17734.                            c:\> timer
  17735.                            Timer 1 on:  12:21:46
  17736.  
  17737.                       When you run TIMER again, the stopwatch stops and the
  17738.                       elapsed time is displayed:
  17739.  
  17740.                            c:\> timer
  17741.                            Timer 1 off:  12:21:58    Elapsed time:
  17742.                            0:00:12.06
  17743.  
  17744.                       There are three stopwatches available (1, 2, and 3) so
  17745.                       you can time multiple overlapping events.  By default,
  17746.                       TIMER uses stopwatch #1.
  17747.  
  17748.                       TIMER is particularly useful for timing events in batch
  17749.                       files.  For example, to time both an entire batch file,
  17750.                       and an intermediate section of the same file, you could
  17751.                       use commands like this:
  17752.  
  17753.                            rem Turn on timer 1
  17754.                            timer
  17755.                            rem Do some work here
  17756.                            rem Turn timer 2 on to time the next section
  17757.                            timer /2
  17758.                            rem Do some more work
  17759.                            echo Intermediate section completed
  17760.                            rem Display time taken in intermediate section
  17761.                            timer /2
  17762.                            rem Do some more work
  17763.                            rem Now display the total time
  17764.                            timer
  17765.  
  17766.  
  17767.  
  17768.  
  17769.  
  17770.           ___________________________________________________________________
  17771.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  304
  17772.  
  17773.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TIMER
  17774.           ___________________________________________________________________
  17775.  
  17776.  
  17777.                       The smallest interval TIMER can measure is .06 second;
  17778.                       the largest interval is 23 hours, 59 minutes, 59.99
  17779.                       seconds.
  17780.  
  17781.           Options:    /1:  Use timer #1 (the default).
  17782.  
  17783.                       /2:  Use timer #2.
  17784.  
  17785.                       /3:  Use timer #3.
  17786.  
  17787.                       /S(plit):  Display a split time without stopping the
  17788.                       timer.  To display the current elapsed time but leave
  17789.                       the timer running:
  17790.  
  17791.                            c:\> timer /s
  17792.                            Timer 1 elapsed: 0:06:40.63
  17793.  
  17794.                       ON:   Start the timer regardless of its previous state
  17795.                       (on or off).  Otherwise the TIMER command toggles the
  17796.                       timer state (unless /S is used).
  17797.  
  17798.  
  17799.  
  17800.  
  17801.  
  17802.  
  17803.  
  17804.  
  17805.  
  17806.  
  17807.  
  17808.  
  17809.  
  17810.  
  17811.  
  17812.  
  17813.  
  17814.  
  17815.  
  17816.  
  17817.  
  17818.  
  17819.  
  17820.  
  17821.  
  17822.  
  17823.  
  17824.  
  17825.  
  17826.  
  17827.           ___________________________________________________________________
  17828.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  305
  17829.  
  17830.                              CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TRUENAME
  17831.           ___________________________________________________________________
  17832.  
  17833.  
  17834.           TRUENAME                                                      (New)
  17835.  
  17836.           Purpose:    Find the full, true path and file name for a file.
  17837.  
  17838.           Format:     TRUENAME file
  17839.  
  17840.                       file:  The file whose name TRUENAME will report.
  17841.  
  17842.                       See also: @truename variable function on page 89.
  17843.  
  17844.           Usage:      Default directories, as well as the JOIN and SUBST
  17845.                       external commands, can obscure the true name of a file.
  17846.                       TRUENAME "sees through" these obstacles and reports the
  17847.                       fully qualified name of a file.
  17848.  
  17849.                       The following example uses TRUENAME to get the true
  17850.                       pathname for a file:
  17851.  
  17852.                            c:\> subst d: c:\util\test
  17853.                            c:\> truename d:\test.exe
  17854.                            c:\util\test\test.exe
  17855.  
  17856.                       TRUENAME requires MS-DOS or PC-DOS 3.0 or above.
  17857.  
  17858.  
  17859.  
  17860.  
  17861.  
  17862.  
  17863.  
  17864.  
  17865.  
  17866.  
  17867.  
  17868.  
  17869.  
  17870.  
  17871.  
  17872.  
  17873.  
  17874.  
  17875.  
  17876.  
  17877.  
  17878.  
  17879.  
  17880.  
  17881.  
  17882.  
  17883.  
  17884.           ___________________________________________________________________
  17885.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  306
  17886.  
  17887.                                  CHAPTER 8 / COMMAND REFERENCE GUIDE  /  TYPE
  17888.           ___________________________________________________________________
  17889.  
  17890.  
  17891.           TYPE                                                     (Enhanced)
  17892.  
  17893.           Purpose:    Display the contents of the specified file(s).
  17894.  
  17895.           Format:     TYPE [/L /P] file...
  17896.  
  17897.                       file:  The file or list of files that you want to
  17898.                       display.
  17899.  
  17900.                       /L(ine numbers)             /P(ause)
  17901.  
  17902.                       See also: LIST.
  17903.  
  17904.           Usage:      The TYPE command displays a file.  It is normally only
  17905.                       useful for displaying ASCII text files.  Executable
  17906.                       files (.COM and .EXE) and many data files may be
  17907.                       unreadable when displayed with TYPE because they
  17908.                       include non-alphanumeric characters.
  17909.  
  17910.                       To display the files MEMO1 and MEMO2:
  17911.  
  17912.                            c:\> type /p memo1 memo2
  17913.  
  17914.                       You can press Ctrl-S to pause TYPE's display and then
  17915.                       any key to continue.
  17916.  
  17917.                       You will probably find LIST to be more useful for
  17918.                       displaying files.  However, the TYPE /L command used
  17919.                       with redirection (see page 65) is useful if you want to
  17920.                       add line numbers to a file.
  17921.  
  17922.           Options:    /L(ine numbers):  Print a line number preceding each
  17923.                       line of text.
  17924.  
  17925.                       /P(ause):  Wait for a keystroke after displaying each
  17926.                       page.  Press Ctrl-C to quit, or any other key to
  17927.                       continue.
  17928.  
  17929.  
  17930.  
  17931.  
  17932.  
  17933.  
  17934.  
  17935.  
  17936.  
  17937.  
  17938.  
  17939.  
  17940.  
  17941.           ___________________________________________________________________
  17942.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  307
  17943.  
  17944.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  UNALIAS
  17945.           ___________________________________________________________________
  17946.  
  17947.  
  17948.           UNALIAS                                                       (New)
  17949.  
  17950.           Purpose:    Remove aliases from the alias list.
  17951.  
  17952.           Format:     UNALIAS alias...
  17953.                            or
  17954.                       UNALIAS *
  17955.  
  17956.                       alias:  One or more aliases to remove from memory.
  17957.  
  17958.                       See also: ALIAS and ESET.
  17959.  
  17960.           Usage:      4DOS maintains a list of the aliases that you have
  17961.                       defined.  The UNALIAS command will remove aliases from
  17962.                       that list.  You can remove one or more aliases by name,
  17963.                       or you can delete the entire alias list by using the
  17964.                       command UNALIAS *
  17965.  
  17966.                       For example, to remove the alias DDIR:
  17967.  
  17968.                            c:\> unalias ddir
  17969.  
  17970.                       To remove all the aliases:
  17971.  
  17972.                            c:\> unalias *
  17973.  
  17974.  
  17975.  
  17976.  
  17977.  
  17978.  
  17979.  
  17980.  
  17981.  
  17982.  
  17983.  
  17984.  
  17985.  
  17986.  
  17987.  
  17988.  
  17989.  
  17990.  
  17991.  
  17992.  
  17993.  
  17994.  
  17995.  
  17996.  
  17997.  
  17998.           ___________________________________________________________________
  17999.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  308
  18000.  
  18001.                                 CHAPTER 8 / COMMAND REFERENCE GUIDE  /  UNSET
  18002.           ___________________________________________________________________
  18003.  
  18004.  
  18005.           UNSET                                                         (New)
  18006.  
  18007.           Purpose:    Remove variables from the environment.
  18008.  
  18009.           Format:     UNSET  [/M] name...
  18010.                            or
  18011.                       UNSET *
  18012.  
  18013.                       name:  One or more variables to remove from the
  18014.                       environment.
  18015.  
  18016.                       /M(aster environment)
  18017.  
  18018.                       See also: SET and ESET.
  18019.  
  18020.           Usage:      See the SET command and page 78 for a discussion of
  18021.                       environment variables.
  18022.  
  18023.                       UNSET removes one or more variables from the
  18024.                       environment.  For example, to remove the variable
  18025.                       CMDLINE:
  18026.  
  18027.                            c:\> unset cmdline
  18028.  
  18029.                       If you use the command UNSET *, all of the environment
  18030.                       variables will be deleted:
  18031.  
  18032.                            c:\> unset *
  18033.  
  18034.                       UNSET is often used in conjunction with the SETLOCAL
  18035.                       and ENDLOCAL commands in order to clear the environment
  18036.                       of variables that may cause problems for some
  18037.                       applications.
  18038.  
  18039.                   !   Use caution when removing environment variables, and
  18040.                       especially when using UNSET *.  Many programs will not
  18041.                       work properly without certain environment variables;
  18042.                       4DOS itself depends on PATH and COMSPEC.
  18043.  
  18044.           Option: ##  /M(aster):  Remove the variable from the master
  18045.                       environment rather than the local environment.  This
  18046.                       option only makes sense if used in a secondary command
  18047.                       processor.
  18048.  
  18049.  
  18050.  
  18051.  
  18052.  
  18053.  
  18054.  
  18055.           ___________________________________________________________________
  18056.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  309
  18057.  
  18058.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  VER
  18059.           ___________________________________________________________________
  18060.  
  18061.  
  18062.           VER                                                      (Enhanced)
  18063.  
  18064.           Purpose:    Display the current 4DOS and DOS versions.
  18065.  
  18066.           Format:     VER [/R]
  18067.  
  18068.                       /R(evision level)
  18069.  
  18070.           Usage:      Both the 4DOS and DOS version numbers consist of a one-
  18071.                       digit major version number, a period, and a one- or
  18072.                       two-digit minor version number.  The VER command
  18073.                       displays both version numbers:
  18074.  
  18075.                            c:\> ver
  18076.                            4DOS 4.0  DOS 5.0
  18077.  
  18078.           Option:     /R(evision level):  Display the DOS revision level, and
  18079.                       whether DOS is loaded into the high memory area (HMA),
  18080.                       is resident in ROM, or is in normal base memory.  The
  18081.                       output from /R is only meaningful in MS-DOS or PC-DOS
  18082.                       version 5.0 or above.
  18083.  
  18084.  
  18085.  
  18086.  
  18087.  
  18088.  
  18089.  
  18090.  
  18091.  
  18092.  
  18093.  
  18094.  
  18095.  
  18096.  
  18097.  
  18098.  
  18099.  
  18100.  
  18101.  
  18102.  
  18103.  
  18104.  
  18105.  
  18106.  
  18107.  
  18108.  
  18109.  
  18110.  
  18111.  
  18112.           ___________________________________________________________________
  18113.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  310
  18114.  
  18115.                                CHAPTER 8 / COMMAND REFERENCE GUIDE  /  VERIFY
  18116.           ___________________________________________________________________
  18117.  
  18118.  
  18119.           VERIFY                                                 (Compatible)
  18120.  
  18121.           Purpose:    Enable or disable disk write verification or display
  18122.                       the verification state.
  18123.  
  18124.           Format:     VERIFY [ON | OFF]
  18125.  
  18126.           Usage:      DOS maintains an internal verify flag.  When the flag
  18127.                       is on, DOS attempts to verify each disk write by making
  18128.                       sure that the data written to the disk can be read back
  18129.                       successfully into the computer.  It does NOT compare
  18130.                       the data written with the data actually placed on disk.
  18131.  
  18132.                       If used without any parameters, VERIFY will display the
  18133.                       state of the DOS verify flag:
  18134.  
  18135.                            c:\> verify
  18136.                            VERIFY is OFF
  18137.  
  18138.                       VERIFY is off when the system boots up.  Once it is
  18139.                       turned on with the VERIFY ON command, it stays on until
  18140.                       you use the VERIFY OFF command or until you reboot.
  18141.  
  18142.                       Verification will slow your disk write operations
  18143.                       slightly.
  18144.  
  18145.  
  18146.  
  18147.  
  18148.  
  18149.  
  18150.  
  18151.  
  18152.  
  18153.  
  18154.  
  18155.  
  18156.  
  18157.  
  18158.  
  18159.  
  18160.  
  18161.  
  18162.  
  18163.  
  18164.  
  18165.  
  18166.  
  18167.  
  18168.  
  18169.           ___________________________________________________________________
  18170.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  311
  18171.  
  18172.                                   CHAPTER 8 / COMMAND REFERENCE GUIDE  /  VOL
  18173.           ___________________________________________________________________
  18174.  
  18175.  
  18176.           VOL                                                      (Enhanced)
  18177.  
  18178.           Purpose:    Display a disk volume label(s).
  18179.  
  18180.           Format:     VOL [d:] ...
  18181.  
  18182.                       d:  The drive or drives to search for labels.
  18183.  
  18184.           Usage:      Each disk may have a volume label, created when the
  18185.                       disk is formatted or with the DOS external LABEL
  18186.                       command.  Also, every floppy disk formatted with DOS
  18187.                       version 4.0 or above has a volume serial number.
  18188.  
  18189.                       The VOL command will display the volume label and, if
  18190.                       you are using DOS 4.0 or later, the volume serial
  18191.                       number of a disk volume.  If the disk doesn't have a
  18192.                       volume label, VOL will report that it is "unlabeled."
  18193.                       If you don't specify a drive, VOL displays information
  18194.                       about the current drive:
  18195.  
  18196.                            c:\> vol
  18197.                            Volume in drive C: is MYHARDDISK
  18198.  
  18199.                       If you are using DOS 4.0 or later, the disk serial
  18200.                       number will appear after the drive label or name.
  18201.  
  18202.                       To display the disk labels for drives A and B:
  18203.  
  18204.                            c:\> vol a: b:
  18205.                            Volume in drive A: is unlabeled
  18206.                            Volume in drive B: is BACKUP_2
  18207.  
  18208.  
  18209.  
  18210.  
  18211.  
  18212.  
  18213.  
  18214.  
  18215.  
  18216.  
  18217.  
  18218.  
  18219.  
  18220.  
  18221.  
  18222.  
  18223.  
  18224.  
  18225.  
  18226.           ___________________________________________________________________
  18227.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  312
  18228.  
  18229.                               CHAPTER 8 / COMMAND REFERENCE GUIDE  /  VSCRPUT
  18230.           ___________________________________________________________________
  18231.  
  18232.  
  18233.           VSCRPUT                                                       (New)
  18234.  
  18235.           Purpose:    Display text vertically in the specified color.
  18236.  
  18237.           Format:     VSCRPUT  row col [BRIght] [BLInk] fg ON bg text
  18238.  
  18239.                       row:  Starting row number.
  18240.                       col:  Starting column number
  18241.                       fg:  Foreground text color
  18242.                       bg:  Background text color
  18243.                       text:  The text to display
  18244.  
  18245.                       The available colors are:
  18246.  
  18247.                         Black         Blue          Green         Red
  18248.                         Magenta       Cyan          Yellow        White
  18249.  
  18250.                       See also: SCRPUT.
  18251.  
  18252.           Usage:      VSCRPUT writes text vertically on the screen rather
  18253.                       than horizontally.  Like the SCRPUT command, it uses
  18254.                       the colors you specify to write the text.  VSCRPUT can
  18255.                       be used for simple graphs and charts generated by batch
  18256.                       files.
  18257.  
  18258.                       The row and column are zero-based, so on a standard 25
  18259.                       row by 80 column display, valid rows are 0 - 24 and
  18260.                       valid columns are 0 - 79.
  18261.  
  18262.                       Only the first three characters of the color name and
  18263.                       the attributes BRIGHT and BLINK are required.
  18264.  
  18265.                       The following batch file fragment displays an X and Y
  18266.                       axis and labels them:
  18267.  
  18268.                            cls bright white on blue
  18269.                            drawhline 20 10 40 1 bright white on blue
  18270.                            drawvline 2 10 19 1 bright white on blue
  18271.                            scrput 21 20 bright red on blue X axis
  18272.                            vscrput 8 9 bright red on blue Y axis
  18273.  
  18274.                       VSCRPUT checks for a valid row and column, and displays
  18275.                       a "Usage" error message if either value is out of
  18276.                       range.
  18277.  
  18278.  
  18279.  
  18280.  
  18281.  
  18282.  
  18283.           ___________________________________________________________________
  18284.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  313
  18285.  
  18286.                                     CHAPTER 8 / COMMAND REFERENCE GUIDE  /  Y
  18287.           ___________________________________________________________________
  18288.  
  18289.  
  18290.           Y                                                             (New)
  18291.  
  18292.           Purpose:    Copy standard input to standard output, and then copy
  18293.                       the specified file(s) to standard output.
  18294.  
  18295.           Format:     Y file ...
  18296.  
  18297.                       file:  The file or list of files to send to standard
  18298.                       output.
  18299.  
  18300.                       See also: TEE.
  18301.  
  18302.           ## Usage:   The Y command copies input from standard input (usually
  18303.                       the keyboard) to standard output (usually the screen).
  18304.                       Once the input ends, the named files are appended to
  18305.                       standard output.
  18306.  
  18307.                       For example, to get text from standard input, append
  18308.                       the files MEMO1 and MEMO2 to it, and send the output to
  18309.                       MEMOS:
  18310.  
  18311.                            c:\> y memo1 memo2 > memos
  18312.  
  18313.                       The Y command is most useful if you want to add
  18314.                       redirected data to the beginning of a file instead of
  18315.                       appending it to the end.
  18316.  
  18317.                       If you are typing at the keyboard to produce input text
  18318.                       for Y, you must enter a Ctrl-Z to terminate the input.
  18319.  
  18320.  
  18321.  
  18322.  
  18323.  
  18324.  
  18325.  
  18326.  
  18327.  
  18328.  
  18329.  
  18330.  
  18331.  
  18332.  
  18333.  
  18334.  
  18335.  
  18336.  
  18337.  
  18338.  
  18339.  
  18340.           ___________________________________________________________________
  18341.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  314
  18342.  
  18343.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18344.           ___________________________________________________________________
  18345.  
  18346.  
  18347.  
  18348.           APPENDIX A / 4DOS ERROR MESSAGES
  18349.  
  18350.  
  18351.           This appendix lists error messages generated by 4DOS, and includes
  18352.           a recommended course of action for most errors.  If you are unable
  18353.           to resolve the problem look through Chapter 7 / Using 4DOS With
  18354.           Your Hardware and Software, beginning on page 139, or contact JP
  18355.           Software for technical support (see page 7).
  18356.  
  18357.           Error messages relating to files are generally reports of errors
  18358.           returned by DOS.  You may find some of these messages (for example,
  18359.           "Access denied") vague enough that they are not always helpful.
  18360.           4DOS includes the file name in file error messages, but is often
  18361.           unable to determine a more accurate explanation of these DOS
  18362.           errors.  The message shown is the best information available based
  18363.           on the error codes returned by DOS.
  18364.  
  18365.           The following list includes all error messages, in alphabetical
  18366.           order:
  18367.  
  18368.               4DOS initialization error --:  An error occurred during the
  18369.               4DOS startup process.  Look up the rest of the message in this
  18370.               list for a more specific explanation.
  18371.  
  18372.               4DOS server error --:  An error occurred in communication
  18373.               between 4DOS's resident and transient portions.  Look up the
  18374.               rest of the message in this list for a more specific
  18375.               explanation.
  18376.  
  18377.               4DOS swapping failed, loading in memory-resident mode:  None
  18378.               of the swapping options worked.  Check your Swapping
  18379.               specification in 4DOS.INI, and/or free some XMS or EMS memory
  18380.               or disk space.
  18381.  
  18382.               4DOS unrecoverable error XX:  An error occurred in the
  18383.               resident portion of 4DOS.  These errors will terminate
  18384.               secondary shells and require a reboot if they occur during a
  18385.               primary shell or if 4DOS cannot continue.
  18386.                    BI    Bad server function code.  Contact JP Software.
  18387.                    DI    Same as Disk swap file corrupted.
  18388.                    DR    Same as Swap file read error.
  18389.                    DS    Same as Swap file seek error.
  18390.                    EI    Same as EMS mapping error.
  18391.                    NS    No number for new shell.  You have started too many
  18392.                          4DOS secondary shells without properly exiting some
  18393.                          of them, perhaps by closing DESQView windows rather
  18394.  
  18395.  
  18396.  
  18397.           ___________________________________________________________________
  18398.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  315
  18399.  
  18400.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18401.           ___________________________________________________________________
  18402.  
  18403.  
  18404.                          than EXITing.  Clean up any work in process and
  18405.                          reboot the system.
  18406.                    PT    Illegal process termination.  Contact JP Software.
  18407.                    TS    Terminated inactive shell.  Contact JP Software.
  18408.                    XI    Same as XMS move failed.
  18409.  
  18410.               Access denied:  You tried to write to or erase a read-only
  18411.               protected file, to rename a file or directory to an existing
  18412.               name, to create a directory that already exists, or to remove
  18413.               a read-only directory or a directory with files or
  18414.               subdirectories still in it.
  18415.  
  18416.               Alias loop:  An alias refers back to itself either directly or
  18417.               indirectly (i.e., a = b = a), or aliases are nested more than
  18418.               16 deep.  Correct your alias list.
  18419.  
  18420.               Ambiguous directive name:  The name of a 4DOS.INI directive
  18421.               was not fully spelled out and was therefore ambiguous.  Spell
  18422.               out the directive more fully to make its name unambiguous.
  18423.  
  18424.               Attempt to exit from root shell:  Another program has
  18425.               destroyed a portion of 4DOS's memory.  Reboot the system; if
  18426.               the error persists, contact JP Software.
  18427.  
  18428.               Bad disk unit:  Generally caused by a disk drive hardware
  18429.               failure.
  18430.  
  18431.               Bad environment:  The DOS environment has a bad structure,
  18432.               probably because a program destroyed 4DOS's master environment
  18433.               space.  Reboot the system.
  18434.  
  18435.               Batch file missing:  4DOS can't find the batch (.BAT) file it
  18436.               was running.  It was either deleted, renamed, moved, or the
  18437.               disk was changed.  Correct the problem and rerun the file.
  18438.  
  18439.               Can't copy file to itself:  4DOS will not permit you to COPY
  18440.               or MOVE a file to itself.  4DOS performs full path and
  18441.               filename expansion before copying to ensure that files aren't
  18442.               inadvertently destroyed.
  18443.  
  18444.               Can't create:  4DOS can't create the specified file.  The disk
  18445.               may be full or write protected, or the file already exists and
  18446.               is read-only, or the root directory is full.
  18447.  
  18448.               Can't delete:  4DOS can't delete the specified file or
  18449.               directory.  The disk is probably write protected.
  18450.  
  18451.  
  18452.  
  18453.  
  18454.           ___________________________________________________________________
  18455.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  316
  18456.  
  18457.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18458.           ___________________________________________________________________
  18459.  
  18460.  
  18461.               Can't get directory:  4DOS can't read the directory.  The disk
  18462.               drive is probably not ready.
  18463.  
  18464.               Can't make directory entry:  4DOS can't create the filename in
  18465.               the directory.  This is usually caused by a full root
  18466.               directory.  Create a subdirectory and move some of the files
  18467.               to it.
  18468.  
  18469.               Can't open:  4DOS can't open the specified file.  Either the
  18470.               file doesn't exist or the disk directory or File Allocation
  18471.               Table is damaged.
  18472.  
  18473.               Can't remove current directory:  You attempted to remove the
  18474.               current directory, which DOS does not allow.  Change to the
  18475.               parent directory and try again.
  18476.  
  18477.               Can't set up disk swap file:  The disk swap file you specified
  18478.               cannot be opened.  The path or drive is invalid, the disk is
  18479.               full, DOS is out of file handles, or there is a hardware
  18480.               problem.  Check 4DOS.INI to be sure your Swapping directive is
  18481.               correct.
  18482.  
  18483.               Command line too long:  A single command exceeded 255
  18484.               characters, or the entire command line exceeded 511
  18485.               characters, during alias and variable expansion.  To address
  18486.               this reduce the complexity of the command, or use a batch
  18487.               file.  This error also occurs if you pass an extremely long
  18488.               command line to 4DOS on your SHELL= line in CONFIG.SYS and
  18489.               4DOS does not have room for your command line and the
  18490.               necessary directory information for the COMSPEC environment
  18491.               variable.  In this case, place the commands in a batch file
  18492.               and invoke the batch file from your SHELL= line.
  18493.  
  18494.               Contents lost before copy:  COPY was appending files, and
  18495.               found one of the source files is the same as the target.  That
  18496.               source file is skipped, and appending continues with the next
  18497.               file.
  18498.  
  18499.               Data error:  DOS can't read or write properly to the device.
  18500.               On a floppy drive, this error is usually caused by a defective
  18501.               floppy disk, dirty disk drive heads, or a misalignment between
  18502.               the heads on your drive and the drive on which the disk was
  18503.               created.  On a hard drive, this error may indicate a drive
  18504.               that is too hot or too cold, or a hardware problem.  Retry the
  18505.               operation; if it fails again, correct the hardware or diskette
  18506.               problem.
  18507.  
  18508.  
  18509.  
  18510.  
  18511.           ___________________________________________________________________
  18512.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  317
  18513.  
  18514.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18515.           ___________________________________________________________________
  18516.  
  18517.  
  18518.               Directory stack empty:  POPD or DIRS can't find any entries in
  18519.               the directory stack.
  18520.  
  18521.               Disk is write protected:  The disk cannot be written to.
  18522.               Check the disk and remove the write-protect tab or close the
  18523.               write-protect window if necessary.
  18524.  
  18525.               Disk swap file corrupted:  The 4DOS disk swapping file
  18526.               (4DOSSWAP.nnn) has been moved, deleted, or damaged by another
  18527.               program.  Reboot the system.
  18528.  
  18529.               Drive not ready--close door:  The floppy disk drive door is
  18530.               open.  Close the door and try again.
  18531.  
  18532.               EMS deallocation failed:  4DOS can't deallocate EMS memory
  18533.               when exiting from a secondary shell.  The EMS map has been
  18534.               corrupted or the memory area used by 4DOS or the EMS driver
  18535.               has been destroyed by a program.  Clean up any work in process
  18536.               and reboot the system.
  18537.  
  18538.               EMS map save or restore failed:  4DOS cannot save or restore
  18539.               the EMS page map.  The EMS map has been corrupted, memory has
  18540.               been destroyed by a program, or you have an incompatible EMS
  18541.               driver.  If this error recurs, try another swapping method,
  18542.               update your EMS driver, or contact JP Software.
  18543.  
  18544.               EMS mapping failed:  4DOS can't map EMS pages when swapping to
  18545.               or from EMS.  The EMS map has been corrupted or the memory
  18546.               area used by the loader or the EMS driver has been destroyed
  18547.               by a program.  Reboot the system.
  18548.  
  18549.               Environment already saved:  You have already saved the
  18550.               environment with a previous SETLOCAL command.  You cannot nest
  18551.               SETLOCAL / ENDLOCAL pairs.
  18552.  
  18553.               Error in command line directive:  You used the //iniline
  18554.               option to place a 4DOS.INI directive on the SHELL= line in
  18555.               CONFIG.SYS or on the startup command line for a secondary
  18556.               shell, but the directive is in error.  A more specific error
  18557.               message follows.
  18558.  
  18559.               Error on line N of 4DOS.INI:  There is an error in 4DOS.INI.
  18560.               This message is followed by a more specific message, which can
  18561.               be looked up in this list, and the text of the incorrect
  18562.               directive.  Correct the directive and reboot for the change to
  18563.               take effect.
  18564.  
  18565.  
  18566.  
  18567.  
  18568.           ___________________________________________________________________
  18569.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  318
  18570.  
  18571.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18572.           ___________________________________________________________________
  18573.  
  18574.  
  18575.               Error reading:  DOS experienced an I/O error when reading from
  18576.               a device.  This is usually caused by a bad disk, a device not
  18577.               ready, or a hardware error.
  18578.  
  18579.               Error writing:  DOS experienced an I/O error when writing to a
  18580.               device.  This is usually caused by a full disk, a bad disk, a
  18581.               device not ready, or a hardware error.
  18582.  
  18583.               Exceeded batch nesting limit:  You have attempted to nest
  18584.               batch files more than 10 levels deep.
  18585.  
  18586.               Fatal error -- please reboot:  4DOS cannot continue due to the
  18587.               previous error.  Reboot the system.
  18588.  
  18589.               File Allocation Table bad:  DOS can't access the FAT on the
  18590.               specified disk.  This can be caused by a bad disk, a hardware
  18591.               error, or an unusual software interaction.
  18592.  
  18593.               File exists:  The requested output file already exists, and
  18594.               4DOS won't overwrite it.
  18595.  
  18596.               File not found:  4DOS couldn't find the specified file.  Check
  18597.               the spelling or path name.
  18598.  
  18599.               General failure:  This is usually a hardware problem,
  18600.               particularly a disk drive failure or a device not properly
  18601.               connected to a serial or parallel port.  Try to correct the
  18602.               problem or reboot and try again.
  18603.  
  18604.               INI file processing error at line n, remainder of file
  18605.               skipped:  An input error (such as a data error) has prevented
  18606.               4DOS from fully processing your 4DOS.INI file.  Check that the
  18607.               file is readable by another program, or TYPE it to ensure that
  18608.               4DOS reads the file properly.
  18609.  
  18610.               Insufficient disk space:  COPY or MOVE ran out of room on the
  18611.               destination drive.  Remove some files and retry the operation.
  18612.  
  18613.               Internal DOS error:  DOS encountered an internal bug and
  18614.               failed. Reboot the system.
  18615.  
  18616.               Invalid choice value:  You gave an invalid value for a
  18617.               "choice" directive (one that accepts a choice from a list,
  18618.               like "Yes" or "No") in 4DOS.INI.
  18619.  
  18620.               Invalid color:  You gave an invalid value for a color
  18621.               directive in 4DOS.INI.
  18622.  
  18623.  
  18624.  
  18625.           ___________________________________________________________________
  18626.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  319
  18627.  
  18628.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18629.           ___________________________________________________________________
  18630.  
  18631.  
  18632.               Invalid date:  An invalid date was entered.  Check the syntax
  18633.               and reenter.
  18634.  
  18635.               Invalid drive:  A bad or non-existent disk drive was
  18636.               specified.
  18637.  
  18638.               Invalid DOS version:  You need a newer version of DOS to
  18639.               execute the specified command.
  18640.  
  18641.               Invalid INI file path or name, file not processed:  The path
  18642.               or name for the initialization file on the SHELL= line in
  18643.               CONFIG.SYS or on the startup command line for a secondary
  18644.               shell.  Correct the @d:\path\inifile option to name the
  18645.               correct file.
  18646.  
  18647.               Invalid directive name:  4DOS can't recognize the name of a
  18648.               directive in your 4DOS.INI file.
  18649.  
  18650.               Invalid key name:  You tried to make an invalid key
  18651.               substitution in 4DOS.INI, or you used an invalid key name in a
  18652.               keystroke alias or KEYSTACK.  Correct the error and retry the
  18653.               operation.
  18654.  
  18655.               Invalid numeric value:  You gave an invalid value for a
  18656.               numeric directive in 4DOS.INI.
  18657.  
  18658.               Invalid parameter:  4DOS didn't recognize a parameter.  Check
  18659.               the syntax and spelling.
  18660.  
  18661.               Invalid path:  The specified path does not exist.  Check the
  18662.               disk specification and/or spelling.
  18663.  
  18664.               Invalid path specification:  You used an invalid path in a
  18665.               path or filename directive in 4DOS.INI.
  18666.  
  18667.               Invalid section name:  You used an invalid section name in
  18668.               4DOS.INI.  The only valid section names are [Primary] and
  18669.               [Secondary].
  18670.  
  18671.               Invalid startup switch, ignored:  You passed 4DOS an invalid
  18672.               option on the SHELL= line in CONFIG.SYS or on the startup
  18673.               command line for a secondary shell.  Correct the switch.
  18674.  
  18675.               Invalid Swapping option or path:  The swap type or disk swap
  18676.               path in the 4DOS.INI Swapping directive is invalid.  4DOS
  18677.               ignores the bad swap type or path and attempts to scan the
  18678.               rest of the Swapping specification for a valid option.
  18679.               Multiple errors in the Swapping directive will cause this
  18680.  
  18681.  
  18682.           ___________________________________________________________________
  18683.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  320
  18684.  
  18685.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18686.           ___________________________________________________________________
  18687.  
  18688.  
  18689.               message to repeat.  Correct 4DOS.INI and reboot the system for
  18690.               the corrected swap type to take effect.
  18691.  
  18692.               Invalid time:  An invalid time was entered.  Check the syntax
  18693.               and reenter.
  18694.  
  18695.               Keystroke substitution table full:  4DOS ran out of room to
  18696.               store keystroke substitutions entered in 4DOS.INI.  Reduce the
  18697.               number of key substitutions or contact JP Software for
  18698.               assistance.
  18699.  
  18700.               KSTACK.COM not loaded:  You attempted to execute a KEYSTACK
  18701.               command without loading KSTACK.COM.  See the KEYSTACK command
  18702.               for more information.
  18703.  
  18704.               Label not found:  A GOTO or GOSUB referred to a non-existent
  18705.               label. Check your batch file.
  18706.  
  18707.               Memory deallocation error:  4DOS can't deallocate memory while
  18708.               loading.  DOS memory allocation has been corrupted.  Reboot
  18709.               the system.
  18710.  
  18711.               Memory destroyed:  The DOS memory control blocks have been
  18712.               corrupted.  Reboot the system.
  18713.  
  18714.               Missing ENDTEXT:  A TEXT command is missing a matching
  18715.               ENDTEXT.  Check the batch file.
  18716.  
  18717.               Missing GOSUB:  4DOS cannot perform the RETURN command in a
  18718.               batch file.  You tried to do a RETURN without a GOSUB, or your
  18719.               batch file has been corrupted.
  18720.  
  18721.               Missing SETLOCAL:  4DOS encountered an ENDLOCAL without a
  18722.               matching SETLOCAL.
  18723.  
  18724.               No aliases defined:  You tried to display aliases but no
  18725.               aliases have been defined.
  18726.  
  18727.               No closing quote:  4DOS couldn't find a second matching quote
  18728.               (` or ") on the command line.
  18729.  
  18730.               No file handle available:  This is an internal 4DOS disk
  18731.               swapping error.  Change to another swapping method if
  18732.               possible, and contact JP Software.
  18733.  
  18734.               No room for INI file name.   4DOS does not have enough space
  18735.               in the INI file string area to pass the name of your 4DOS.INI
  18736.               fileto secondary shells.  4DOS will load and run properly, but
  18737.  
  18738.  
  18739.           ___________________________________________________________________
  18740.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  321
  18741.  
  18742.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18743.           ___________________________________________________________________
  18744.  
  18745.  
  18746.               any [Secondary] section in 4DOS.INI will be ignored in
  18747.               secondary shells.  Reduce the complexity of 4DOS.INI or
  18748.               contact JP Software for assistance.
  18749.  
  18750.               No UMBs; loading low:  The LOADHIGH (or LH) command can't find
  18751.               any UMBs for your program.  The program is loaded into base
  18752.               memory.  LH and LOADHIGH only work with MS-DOS 5.0 and above,
  18753.               when the DOS=UMB directive is included in CONFIG.SYS and
  18754.               sufficient upper memory space is available for the program.
  18755.  
  18756.               No upper memory available, master environment will be placed
  18757.               in low memory:  You asked 4DOS to load the master environment
  18758.               into an UMB via the UMBEnvironment directive in 4DOS.INI, but
  18759.               no UMB was available.  Check that your XMS driver is properly
  18760.               installed and / or free up some UMB space in use by another
  18761.               program.
  18762.  
  18763.               No upper memory available, resident portion will remain in low
  18764.               memory:  You requested relocation of the 4DOS resident portion
  18765.               to an UMB via the UMBLoad directive in 4DOS.INI, but no UMB
  18766.               was available.  Check that your XMS driver is properly
  18767.               installed and / or free up some UMB space in use by another
  18768.               program.
  18769.  
  18770.               Non-DOS disk:  DOS can't read the disk.  Either the disk is
  18771.               bad, or it has been formatted by a different operating system.
  18772.               Reformat it as a DOS disk.
  18773.  
  18774.               Not an alias:  The specified alias is not in the 4DOS alias
  18775.               list.
  18776.  
  18777.               Not in environment:  The specified variable is not in the
  18778.               environment.
  18779.  
  18780.               Not in swapping mode:  You attempted to turn swapping on or
  18781.               off with the SWAPPING command, but 4DOS is loaded in memory-
  18782.               resident mode and swapping is not active.
  18783.  
  18784.               Not ready:  The specified device can't be accessed.
  18785.  
  18786.               Not same device:  This error usually appears in RENAME.  You
  18787.               cannot rename a file to a different disk drive.
  18788.  
  18789.               Out of environment space:  4DOS has run out of environment
  18790.               space.  Edit the SHELL line in CONFIG.SYS or the Environment
  18791.               directive in 4DOS.INI to increase the environment size.
  18792.  
  18793.  
  18794.  
  18795.  
  18796.           ___________________________________________________________________
  18797.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  322
  18798.  
  18799.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18800.           ___________________________________________________________________
  18801.  
  18802.  
  18803.               Out of memory:  DOS or 4DOS had insufficient free memory to
  18804.               execute the last command, or the DOS memory control blocks
  18805.               have been destroyed.  If this error occurs in a secondary
  18806.               shell, return to the primary shell before running the command.
  18807.               Otherwise, try to free some memory by removing memory-resident
  18808.               programs.  If the error persists, use the MEMORY command to
  18809.               determine the actual memory available.  If the base memory
  18810.               (DOS RAM) figures reported by MEMORY are unreasonable, the
  18811.               memory control blocks have probably been destroyed and you
  18812.               must reboot the system.  If you receive this error from DIR
  18813.               when the MEMORY command shows sufficient memory for the
  18814.               directory you are displaying, memory has probably been
  18815.               "fragmented", and contains a free area larger than 8K but not
  18816.               large enough for the entire directory.  Use a memory mapping
  18817.               program like PMAP, MAPMEM, or MANIFEST to determine where the
  18818.               fragmentation is, and experiment with your TSRs and
  18819.               applications to determine and remove its cause.
  18820.  
  18821.               Out of paper:  DOS detected an out-of-paper condition on one
  18822.               of the parallel printers (LPT1, LPT2, or LPT3).  Check your
  18823.               printer and add paper if necessary.
  18824.  
  18825.               Overflow:  An arithmetic overflow occurred in the %@EVAL
  18826.               variable function.  Check the values being passed to %@EVAL.
  18827.               %@EVAL can handle 16 digits to the left of the decimal point
  18828.               and 8 to the right.
  18829.  
  18830.               Read error:  DOS disk read error; usually caused by a bad disk
  18831.               or a non-DOS disk.
  18832.  
  18833.               Sector not found:  BIOS disk error; usually caused by a bad
  18834.               disk or a non-DOS disk.
  18835.  
  18836.               Seek error:  DOS can't seek to the proper location on the
  18837.               disk.  This is generally caused by a bad disk or drive.
  18838.  
  18839.               String area overflow:  4DOS ran out of room to store the text
  18840.               from string directives in 4DOS.INI.  Reduce the complexity of
  18841.               4DOS.INI or contact JP Software for assistance.
  18842.  
  18843.               Swap file [seek | read | write] failed:  4DOS  encountered an
  18844.               I/O error while accessing the disk swap file (4DOSSWAP.nnn).
  18845.               The disk was changed, the file has been destroyed by a
  18846.               program, or 4DOS's memory area has been overwritten by a
  18847.               program.  Reboot the system.
  18848.  
  18849.  
  18850.  
  18851.  
  18852.  
  18853.           ___________________________________________________________________
  18854.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  323
  18855.  
  18856.                                              APPENDIX A / 4DOS ERROR MESSAGES
  18857.           ___________________________________________________________________
  18858.  
  18859.  
  18860.               Syntax error:  A command or variable function was entered in
  18861.               an improper format.  Check the syntax in this manual and
  18862.               correct the error.
  18863.  
  18864.               Too many open files:  DOS has run out of file handles.  Try
  18865.               setting FILES=20 or more in your CONFIG.SYS file.
  18866.  
  18867.               Transient memory allocation error:  4DOS couldn't reserve
  18868.               memory for its transient portion (probably in a SWAPPING OFF
  18869.               command).  The memory control blocks have been destroyed, or a
  18870.               program has fragmented memory.  Reboot the system.
  18871.  
  18872.               Transient memory deallocation error:  4DOS couldn't release
  18873.               memory for its transient portion (probably in a SWAPPING ON
  18874.               command).  The memory control blocks have been destroyed, or a
  18875.               program has fragmented memory.  Reboot the system.
  18876.  
  18877.               Unknown command:  A command was entered that 4DOS didn't
  18878.               recognize and couldn't find in the current search path.  Check
  18879.               the spelling or PATH specification.
  18880.  
  18881.               Variable loop:  A nested environment variable refers to
  18882.               itself, or variables are nested more than 16 deep.  Correct
  18883.               the error and retry the command.
  18884.  
  18885.               Write error:  A DOS disk error, usually caused by a bad disk
  18886.               or a non-DOS disk.
  18887.  
  18888.               XMS deallocation failed:  4DOS could not deallocate XMS memory
  18889.               when exiting a secondary shell.  XMS memory has been
  18890.               destroyed; reboot your system.
  18891.  
  18892.               XMS move failed:  4DOS could not move data between base memory
  18893.               and XMS memory while swapping itself.  XMS memory has been
  18894.               destroyed; reboot your system.
  18895.  
  18896.  
  18897.  
  18898.  
  18899.  
  18900.  
  18901.  
  18902.  
  18903.  
  18904.  
  18905.  
  18906.  
  18907.  
  18908.  
  18909.  
  18910.           ___________________________________________________________________
  18911.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  324
  18912.  
  18913.                                              APPENDIX B / ASCII AND KEY CODES
  18914.           ___________________________________________________________________
  18915.  
  18916.  
  18917.  
  18918.           APPENDIX B / ASCII AND KEY CODES
  18919.  
  18920.  
  18921.           ASCII
  18922.  
  18923.               To represent the text you type, computers must translate each
  18924.               letter to and from a number.  The code used by all PC-
  18925.               compatible computers for this translation is called ASCII
  18926.               (American Standard Code for Information Interchange).  ASCII
  18927.               codes are also used for the characters displayed on the
  18928.               screen.  Function keys, cursor keys, and Alt keys do not
  18929.               generate ASCII codes.  For details on these keys and a
  18930.               reference table, see Keys and Key Codes later in this
  18931.               Appendix.
  18932.  
  18933.               The ASCII table on the following pages is in three parts.  The
  18934.               first two parts cover the 128 standard ASCII characters; the
  18935.               third part covers the additional 128 extended ASCII characters
  18936.               defined by IBM for use on the IBM PC and compatible computers.
  18937.               All the tables include a Char column showing the visual
  18938.               representation of the character, a Dec column showing the
  18939.               decimal numeric value of the character in the ASCII set, and a
  18940.               Hex column showing the hexadecimal (base-16) value.  The
  18941.               tables are divided as follows:
  18942.  
  18943.               ASCII Control Characters have numeric values between 0 and 31,
  18944.               and include non-printing characters like carriage return and
  18945.               line feed.  The ASCII standard does not define a visual
  18946.               representation for control characters, but the IBM PC
  18947.               character set does define one for most control characters as
  18948.               shown in the Char column of the table.  You can enter these
  18949.               characters using the Ctrl key combination shown in the Ctrl
  18950.               column of this table, with a caret [^] representing the Ctrl
  18951.               key.  For example, character 4 is shown as ^D;  to enter it,
  18952.               press Ctrl and D on your keyboard.  You can also enter control
  18953.               characters with the Alt key and the numeric keypad, like
  18954.               extended ASCII codes (see below).  The Name column of this
  18955.               table shows a two or three character "name" given to each
  18956.               control character as part of the ASCII standard.
  18957.  
  18958.               ASCII Printing Characters have numeric values between 32 and
  18959.               127, and include the entire English-language character set as
  18960.               well as punctuation and other special marks.  You enter these
  18961.               characters by pressing the corresponding keyboard key.
  18962.               Character 127 has no corresponding keyboard key, but can be
  18963.               entered on many systems by typing Ctrl-Backspace.
  18964.  
  18965.  
  18966.  
  18967.           ___________________________________________________________________
  18968.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  325
  18969.  
  18970.                                              APPENDIX B / ASCII AND KEY CODES
  18971.           ___________________________________________________________________
  18972.  
  18973.  
  18974.               Extended ASCII Characters have values between 128 and 255 and
  18975.               include international language characters, line-drawing
  18976.               characters, and other graphics symbols.  You can enter
  18977.               extended ASCII codes on the keyboard by holding down the Alt
  18978.               key, entering the decimal numeric value of the key on the
  18979.               numeric keypad, and then releasing the Alt key.
  18980.  
  18981.  
  18982.  
  18983.  
  18984.  
  18985.  
  18986.  
  18987.  
  18988.  
  18989.  
  18990.  
  18991.  
  18992.  
  18993.  
  18994.  
  18995.  
  18996.  
  18997.  
  18998.  
  18999.  
  19000.  
  19001.  
  19002.  
  19003.  
  19004.  
  19005.  
  19006.  
  19007.  
  19008.  
  19009.  
  19010.  
  19011.  
  19012.  
  19013.  
  19014.  
  19015.  
  19016.  
  19017.  
  19018.  
  19019.  
  19020.  
  19021.  
  19022.  
  19023.  
  19024.           ___________________________________________________________________
  19025.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  326
  19026.  
  19027.                                              APPENDIX B / ASCII AND KEY CODES
  19028.           ___________________________________________________________________
  19029.  
  19030.  
  19031.  
  19032.  
  19033.  
  19034.  
  19035.  
  19036.  
  19037.  
  19038.  
  19039.  
  19040.  
  19041.  
  19042.  
  19043.  
  19044.  
  19045.  
  19046.  
  19047.  
  19048.  
  19049.  
  19050.  
  19051.  
  19052.  
  19053.                       This page normally contains part 1 of a complete
  19054.                       ASCII table.  The table has been left out of this
  19055.                       ASCII version of the manual because it will not print
  19056.                       properly on most printers.  If you need an ASCII
  19057.                       table, see the -ASCII- topic in the 4DOS HELP system,
  19058.                       or create your own table and paste it here.
  19059.  
  19060.  
  19061.  
  19062.  
  19063.  
  19064.  
  19065.  
  19066.  
  19067.  
  19068.  
  19069.  
  19070.  
  19071.  
  19072.  
  19073.  
  19074.  
  19075.  
  19076.  
  19077.  
  19078.  
  19079.  
  19080.  
  19081.           ___________________________________________________________________
  19082.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  327
  19083.  
  19084.                                              APPENDIX B / ASCII AND KEY CODES
  19085.           ___________________________________________________________________
  19086.  
  19087.  
  19088.  
  19089.  
  19090.  
  19091.  
  19092.  
  19093.  
  19094.  
  19095.  
  19096.  
  19097.  
  19098.  
  19099.  
  19100.  
  19101.  
  19102.  
  19103.  
  19104.  
  19105.  
  19106.  
  19107.  
  19108.  
  19109.  
  19110.                       This page normally contains part 2 of a complete
  19111.                       ASCII table.  The table has been left out of this
  19112.                       ASCII version of the manual because it will not print
  19113.                       properly on most printers.  If you need an ASCII
  19114.                       table, see the -ASCII- topic in the 4DOS HELP system,
  19115.                       or create your own table and paste it here.
  19116.  
  19117.  
  19118.  
  19119.  
  19120.  
  19121.  
  19122.  
  19123.  
  19124.  
  19125.  
  19126.  
  19127.  
  19128.  
  19129.  
  19130.  
  19131.  
  19132.  
  19133.  
  19134.  
  19135.  
  19136.  
  19137.  
  19138.           ___________________________________________________________________
  19139.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  328
  19140.  
  19141.                                              APPENDIX B / ASCII AND KEY CODES
  19142.           ___________________________________________________________________
  19143.  
  19144.  
  19145.  
  19146.           Keys and Key Codes
  19147.  
  19148.               When you press a single key or a key combination, software
  19149.               built into your computer (the BIOS or Basic Input / Output
  19150.               System) translates your keystroke into two numbers:  a scan
  19151.               code, representing the actual key that was pressed, and an
  19152.               ASCII code, representing the ASCII value for that key.  The
  19153.               BIOS returns these numbers the next time a program requests
  19154.               keyboard input.  This section explains how key codes work;
  19155.               for information on using them with 4DOS features see 4DOS.INI
  19156.               (page 131), keystroke aliases (page 172), INKEY (page 246),
  19157.               and KEYSTACK (page 250).
  19158.  
  19159.               As PCs have evolved, the structure of keyboard codes has
  19160.               evolved somewhat haphazardly with them, resulting in a
  19161.               bewildering array of possible key codes.  We'll give you a
  19162.               basic explanation of how key codes work.  For a more in-depth
  19163.               discussion, refer to a BIOS or PC hardware reference manual.
  19164.  
  19165.               The nuances of how your keyboard behaves depends on the
  19166.               keyboard manufacturer and the computer manufacturer who
  19167.               provides the built-in BIOS.  As a result, we can't guarantee
  19168.               the accuracy of the information below for every system, but
  19169.               the discussion and reference table should be accurate for most
  19170.               systems.  Our discussion is based on the 101-key "enhanced"
  19171.               keyboard commonly used on AT-compatible and PS/2 computers,
  19172.               but virtually all of it is applicable to the 84-key keyboards
  19173.               on older PC and XT systems.  The primary difference is that
  19174.               the older keyboards lack a separate cursor pad and only have
  19175.               10 function keys.
  19176.  
  19177.               All keys have a scan code.  Not all keys have an ASCII code.
  19178.               For example, function keys and cursor keys are not part of the
  19179.               ASCII character set (see above), and have no ASCII value, but
  19180.               they do have a scan code.  Some keys have more than one ASCII
  19181.               code.  The A key, for example, has ASCII code 97 (lower case
  19182.               "a") if you press it by itself.  If you press it along with
  19183.               the Shift key, the ASCII code changes to 65 (upper case "A").
  19184.               If you press Ctrl and A the ASCII code changes to 1.  In all
  19185.               these cases, the scan code (30) is unchanged because you are
  19186.               pressing the same physical key.
  19187.  
  19188.               Things are different if you press Alt-A.  Alt keystrokes have
  19189.               no ASCII code, so the BIOS returns an ASCII code of 0, along
  19190.               with the A key's scan code of 30.  This allows a program to
  19191.               detect all the possible variations of A, based on the
  19192.               combination of ASCII code and scan code.
  19193.  
  19194.  
  19195.           ___________________________________________________________________
  19196.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  329
  19197.  
  19198.                                              APPENDIX B / ASCII AND KEY CODES
  19199.           ___________________________________________________________________
  19200.  
  19201.  
  19202.               Some keys generate more than one scan code depending on
  19203.               whether Shift, Ctrl, or Alt is pressed.  This allows a program
  19204.               to differentiate between two different keystrokes on the same
  19205.               key, neither of which has a corresponding ASCII value.  For
  19206.               example, F1 has no ASCII value so it returns an ASCII code of
  19207.               0, and the F1 scan code of 59.  Shift-F1 also returns an ASCII
  19208.               code 0;  if it also returned a scan code of 59, a program
  19209.               couldn't distinguish it from F1.  The BIOS translates scan
  19210.               codes for keys like Shift-F1 (and Ctrl-F1 and Alt-F1) so that
  19211.               each variation returns a different scan code along with an
  19212.               ASCII code of 0.
  19213.  
  19214.               On the 101-key keyboard that we're discussing, there's one
  19215.               more variation: non-ASCII keys on the cursor keypad (such as
  19216.               up-arrow) return the same scan code as the corresponding key
  19217.               on the numeric keypad, for compatibility reasons.  If they
  19218.               also returned an ASCII code of 0, a program couldn't tell
  19219.               which key was pressed.  Therefore, these keys return an ASCII
  19220.               code of 224 rather than 0.  This means that older programs,
  19221.               which only look for an ASCII 0 to indicate a non-ASCII
  19222.               keystroke like up-arrow, may not detect these cursor pad keys
  19223.               properly.
  19224.  
  19225.               The number of different codes returned by any given key varies
  19226.               from one (the spacebar) to four, depending on the particular
  19227.               key, the design of your keyboard, and the BIOS in your system.
  19228.               Some keys, like the Alt, Ctrl, and Shift by themselves or in
  19229.               combination with each other, plus the Print Screen, SysReq,
  19230.               Scroll Lock, Pause, Break, Num Lock, and Caps Lock keys, do
  19231.               not have any code representations at all.  The same is true of
  19232.               keystrokes with more than one modifying key, like Ctrl-Shift-
  19233.               A.  The BIOS may perform special actions automatically when
  19234.               you press these keys (for example, it switches into Caps Lock
  19235.               mode when you press Caps Lock), but it does not report the
  19236.               keystrokes to whatever program is running.  Programs which
  19237.               detect such keystrokes access the keyboard hardware directly,
  19238.               a subject which is beyond the scope of this manual.
  19239.  
  19240.               The following table lists all of the keys on the 101-key
  19241.               "enhanced" keyboard.  The keys are arranged roughly in scan
  19242.               code order, which is generally left to right, moving from the
  19243.               top of the keyboard to the bottom.
  19244.  
  19245.               Column 1 shows the key's keycap symbol or name.  Columns 2 and
  19246.               3 show the scan and ASCII code if the key is unshifted.
  19247.               Columns 4 & 5 contain the codes for the shifted key.  Columns
  19248.               6 & 7 show the code for Ctrl plus the key.  The last column
  19249.               contains the scan code for Alt plus the key (Alt keystrokes
  19250.  
  19251.  
  19252.           ___________________________________________________________________
  19253.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  330
  19254.  
  19255.                                              APPENDIX B / ASCII AND KEY CODES
  19256.           ___________________________________________________________________
  19257.  
  19258.  
  19259.               have no ASCII code and always generate an ASCII code of 0,
  19260.               which is not shown).
  19261.  
  19262.               Keys with ASCII values return the same scan code regardless of
  19263.               whether Shift, Ctrl, or Alt is pressed, so the scan code
  19264.               columns below may seem repetitive for these keys.  We've
  19265.               included them in the interest of completeness, since you may
  19266.               need to verify the exact code for a particular key
  19267.               combination.
  19268.  
  19269.               Key names prefaced by np are on the numeric keypad.  Those
  19270.               prefaced by cp are on the cursor keypad between the main
  19271.               typing keys and the number keypad.  The numeric keypad values
  19272.               are valid if Num Lock is turned off.  If you need to specify a
  19273.               number key from the numeric keypad, use the scan code shown
  19274.               for the keypad and the ASCII code shown for the corresponding
  19275.               typewriter key.  For example, the keypad "7" has a scan code
  19276.               of 71 (the np Home scan code) and an ASCII code of 54 (the
  19277.               ASCII code for "7").
  19278.  
  19279.               The chart is blank for key combinations that are not reported
  19280.               at all by the BIOS, like Ctrl-1 and Alt-PgUp.
  19281.  
  19282.  
  19283.  
  19284.  
  19285.  
  19286.  
  19287.  
  19288.  
  19289.  
  19290.  
  19291.  
  19292.  
  19293.  
  19294.  
  19295.  
  19296.  
  19297.  
  19298.  
  19299.  
  19300.  
  19301.  
  19302.  
  19303.  
  19304.  
  19305.  
  19306.  
  19307.  
  19308.  
  19309.           ___________________________________________________________________
  19310.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  331
  19311.  
  19312.                                              APPENDIX B / ASCII AND KEY CODES
  19313.           ___________________________________________________________________
  19314.  
  19315.  
  19316.  
  19317.  
  19318.                     Scan Codes and Key Codes for Top Two Keyboard Rows
  19319.  
  19320.                                          Shift  Shift  Ctrl   Ctrl   Alt
  19321.                 Key Cap    Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  19322.                 Symbol     Code   Code   Code   Code   Code   Code   Code
  19323.                 -------    -----  -----  -----  -----  -----  -----  -----
  19324.                 Esc        1      27     1      27     1      27     1
  19325.                 1  !       2      49     2      33                   120
  19326.                 2  @       3      50     3      64     3      0      121
  19327.                 3  #       4      51     4      35                   122
  19328.                 4  $       5      52     5      36                   123
  19329.                 5  %       6      53     6      37                   124
  19330.                 6  ^       7      54     7      94     7      30     125
  19331.                 7  &       8      55     8      38                   126
  19332.                 8  *       9      56     9      42                   127
  19333.                 9  (       10     57     10     40                   128
  19334.                 0  )       11     48     11     41                   129
  19335.                 -  _       12     45     12     95     12     31     130
  19336.                 =  +       13     61     13     43                   131
  19337.                 Backspace  14     8      14     8      14     127    14
  19338.                 Tab        15     9      15     0      148    0      165
  19339.                 Q          16     113    16     81     16     17     16
  19340.                 W          17     119    17     87     17     23     17
  19341.                 E          18     101    18     69     18     5      18
  19342.                 R          19     114    19     82     19     18     19
  19343.                 T          20     116    20     84     20     20     20
  19344.                 Y          21     121    21     89     21     25     21
  19345.                 U          22     117    22     85     22     21     22
  19346.                 I          23     105    23     73     23     9      23
  19347.                 O          24     111    24     79     24     15     24
  19348.                 P          25     112    25     80     25     16     25
  19349.                 [  {       26     91     26     123    26     27     26
  19350.                 ]  }       27     93     27     125    27     29     27
  19351.                 Enter      28     13     28     13     28     10     28
  19352.  
  19353.  
  19354.  
  19355.  
  19356.  
  19357.  
  19358.  
  19359.  
  19360.  
  19361.  
  19362.  
  19363.  
  19364.  
  19365.  
  19366.           ___________________________________________________________________
  19367.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  332
  19368.  
  19369.                                              APPENDIX B / ASCII AND KEY CODES
  19370.           ___________________________________________________________________
  19371.  
  19372.  
  19373.  
  19374.                    Scan Codes and Key Codes for Bottom Two Keyboard Rows
  19375.  
  19376.                                          Shift  Shift  Ctrl   Ctrl   Alt
  19377.                 Key Cap    Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  19378.                 Symbol     Code   Code   Code   Code   Code   Code   Code
  19379.                 -------    -----  -----  -----  -----  -----  -----  -----
  19380.                 A          30     97     30     65     30     1      30
  19381.                 S          31     115    31     83     31     19     31
  19382.                 D          32     100    32     68     32     4      32
  19383.                 F          33     102    33     70     33     6      33
  19384.                 G          34     103    34     71     34     7      34
  19385.                 H          35     104    35     72     35     8      35
  19386.                 J          36     106    36     74     36     10     36
  19387.                 K          37     107    37     75     37     11     37
  19388.                 L          38     108    38     76     38     12     38
  19389.                 ;  :       39     59     39     58                   39
  19390.                 '  "       40     39     40     34                   40
  19391.                 `  ~       41     96     41     126                  41
  19392.                 \  |       43     92     43     124    43     28     43
  19393.                 Z          44     122    44     90     44     26     44
  19394.                 X          45     120    45     88     45     24     45
  19395.                 C          46     99     46     67     46     3      46
  19396.                 V          47     118    47     86     47     22     47
  19397.                 B          48     98     48     66     48     2      48
  19398.                 N          49     110    49     78     49     14     49
  19399.                 M          50     109    50     77     50     13     50
  19400.                 ,  <       51     44     51     60                   51
  19401.                 .  >       52     46     52     62                   52
  19402.                 /  ?       53     47     53     63                   53
  19403.                 Space      57     32     57     32     57     32     57
  19404.  
  19405.  
  19406.  
  19407.  
  19408.  
  19409.  
  19410.  
  19411.  
  19412.  
  19413.  
  19414.  
  19415.  
  19416.  
  19417.  
  19418.  
  19419.  
  19420.  
  19421.  
  19422.  
  19423.           ___________________________________________________________________
  19424.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  333
  19425.  
  19426.                                              APPENDIX B / ASCII AND KEY CODES
  19427.           ___________________________________________________________________
  19428.  
  19429.  
  19430.                   Scan Codes and Key Codes for Key Pads and Function Keys
  19431.  
  19432.                                          Shift  Shift  Ctrl   Ctrl   Alt
  19433.                 Key Cap    Scan   ASCII  Scan   ASCII  Scan   ASCII  Scan
  19434.                 Symbol     Code   Code   Code   Code   Code   Code   Code
  19435.                 -------    -----  -----  -----  -----  -----  -----  -----
  19436.                 F1         59     0      84     0      94     0      104
  19437.                 F2         60     0      85     0      95     0      105
  19438.                 F3         61     0      86     0      96     0      106
  19439.                 F4         62     0      87     0      97     0      107
  19440.                 F5         63     0      88     0      98     0      108
  19441.                 F6         64     0      89     0      99     0      109
  19442.                 F7         65     0      90     0      100    0      110
  19443.                 F8         66     0      91     0      101    0      111
  19444.                 F9         67     0      92     0      102    0      112
  19445.                 F10        68     0      93     0      103    0      113
  19446.                 F11        133    0      135    0      137    0      139
  19447.                 F12        134    0      136    0      138    0      140
  19448.                 np *       55     42     55     42     150    0      55
  19449.                 np Home    71     0      71     55     119    0
  19450.                 cp Home    71     224    71     224    119    224    151
  19451.                 np Up      72     0      72     56     141    0
  19452.                 cp Up      72     224    72     224    141    224    152
  19453.                 np PgUp    73     0      73     57     132    0
  19454.                 cp PgUp    73     224    73     224    132    224    153
  19455.                 np Minus   74     45     74     45     142    0      74
  19456.                 np Left    75     0      75     52     115    0
  19457.                 cp Left    75     224    75     224    115    224    155
  19458.                 np 5       76     0      76     53     143    0
  19459.                 np Right   77     0      77     54     116    0
  19460.                 cp Right   77     224    77     224    116    224    157
  19461.                 np Plus    78     43     78     43     144    0      78
  19462.                 np End     79     0      79     49     117    0
  19463.                 cp End     79     224    79     224    117    224    159
  19464.                 np Down    80     0      80     50     145    0
  19465.                 cp Down    80     224    80     224    145    224    160
  19466.                 np PgDn    81     0      81     51     118    0
  19467.                 cp PgDn    81     224    81     224    118    224    161
  19468.                 np Ins     82     0      82     48     146    0
  19469.                 cp Ins     82     224    82     224    146    224    162
  19470.                 np Del     83     0      83     46     147    0
  19471.                 cp Del     83     224    83     224    147    224    163
  19472.                 np /       224    47     224    47     149    0      164
  19473.                 np Enter   224    13     224    13     224    10     166
  19474.  
  19475.  
  19476.  
  19477.  
  19478.  
  19479.  
  19480.           ___________________________________________________________________
  19481.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  334
  19482.  
  19483.                                            APPENDIX C / TECHNICAL INFORMATION
  19484.           ___________________________________________________________________
  19485.  
  19486.  
  19487.  
  19488.           APPENDIX C / TECHNICAL INFORMATION
  19489.  
  19490.  
  19491.           This appendix provides technical information for programmers who
  19492.           wish to build interfaces to 4DOS.  It covers detecting 4DOS,
  19493.           placing keystrokes in the Keystack, writing installable commands,
  19494.           using the DESCRIPT.ION file, and using the interrupt 2E "back door"
  19495.           entry into 4DOS to execute commands.
  19496.  
  19497.  
  19498.           Detecting 4DOS
  19499.  
  19500.  
  19501.               Detecting 4DOS From a Batch File
  19502.  
  19503.               From a batch file, you can determine if 4DOS is loaded by
  19504.               testing for the variable function @EVAL, with a test like
  19505.               this:
  19506.  
  19507.                    if not "%@eval[2+2]" == "4" echo 4DOS is loaded!
  19508.  
  19509.               This test can never succeed in COMMAND.COM and is therefore a
  19510.               reliable way to detect 4DOS.  Other variable functions could
  19511.               be used for the same purpose.
  19512.  
  19513.  
  19514.               Detecting 4DOS From a Program
  19515.  
  19516.               Any program can test for the presence of 4DOS by making a
  19517.               simple INT 2Fh call.  Be sure to check the INT 2Fh vector
  19518.               first as it may be 0 under some versions of DOS 2 if no
  19519.               program has hooked the interrupt.  To detect 4DOS, call INT
  19520.               2Fh with:
  19521.                     AX = D44Dh
  19522.                     BX = 0
  19523.  
  19524.               If 4DOS is not loaded, AX should be returned unchanged.  If
  19525.               4DOS is loaded, it will return the following (no other
  19526.               registers are modified):
  19527.  
  19528.                     AX = 44DDh
  19529.                     BX = Version number (BL = major version, BH = minor
  19530.                          version)
  19531.                     CX = 4DOS PSP segment address
  19532.                     DL = 4DOS shell number
  19533.  
  19534.  
  19535.  
  19536.  
  19537.           ___________________________________________________________________
  19538.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  335
  19539.  
  19540.                                            APPENDIX C / TECHNICAL INFORMATION
  19541.           ___________________________________________________________________
  19542.  
  19543.  
  19544.               The shell number is incremented each time a new copy of 4DOS
  19545.               is loaded, either in a different multitasker window (for
  19546.               example, under DESQView), or via nested shells.  The primary
  19547.               shell is shell number 0.
  19548.  
  19549.               This function tells you if 4DOS is loaded in memory, but not
  19550.               whether it is the parent process of your program.  You can
  19551.               determine if 4DOS is the parent process by comparing the PSP
  19552.               value returned in CX to the PSP chain pointer at offset 16h in
  19553.               your program's PSP.
  19554.  
  19555.  
  19556.               Detecting the 4DOS Prompt
  19557.  
  19558.               4DOS generates INT 2Fh calls before and after the prompt is
  19559.               displayed to allow TSRs to detect that 4DOS is at the prompt.
  19560.               The calls are:
  19561.  
  19562.                     AX = D44Eh
  19563.                     BX = 0:  4DOS is about to display the prompt
  19564.                          1:  4DOS is about to accept keyboard input at the
  19565.                          prompt
  19566.  
  19567.               The BX = 0 call occurs immediately before displaying the
  19568.               prompt; the BX = 1 call occurs after displaying the prompt and
  19569.               immediately before accepting keyboard input.  Any routine
  19570.               intercepting these calls should preserve the SI, DI, BP, SP,
  19571.               DS, ES, and SS registers.
  19572.  
  19573.  
  19574.           Placing Keystrokes Into the Keystack
  19575.  
  19576.               You can put keystrokes into the 4DOS Keystack with an INT 2Fh
  19577.               call.  First, you must make a call to check whether KSTACK.COM
  19578.               is loaded:
  19579.                    AX =  D44Fh
  19580.                    BX =  0
  19581.  
  19582.               If KSTACK.COM is not loaded, this call will return AX
  19583.               unchanged.  If it is loaded, AX will be returned as 44DDh;
  19584.               other registers will be unchanged.  Once you have determined
  19585.               that KSTACK.COM is loaded, you can send keystrokes with this
  19586.               call:
  19587.  
  19588.                     AX = D44Fh
  19589.                     BX = 1
  19590.                     CX = number of keystrokes being passed
  19591.                     DS:DX = address of the keystroke array
  19592.  
  19593.  
  19594.           ___________________________________________________________________
  19595.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  336
  19596.  
  19597.                                            APPENDIX C / TECHNICAL INFORMATION
  19598.           ___________________________________________________________________
  19599.  
  19600.  
  19601.               On return, if the call succeeded then AX will be 0; if it
  19602.               failed, AX will be non-zero.  BX, CX, and DX are destroyed;
  19603.               other registers are preserved.  If the call succeeds,
  19604.               subsequent calls to INT 16h functions 0, 1, 10h, or 11h will
  19605.               receive the stacked keystrokes.
  19606.  
  19607.               The keystroke array passed to KSTACK must be an array of words
  19608.               containing the values to return from INT 16h.  The high byte
  19609.               of each word is a scan code and the low byte is an ASCII code.
  19610.               Many programs accept keystrokes properly with only the ASCII
  19611.               code, but some require the scan code as well.  See page 329
  19612.               for a list of ASCII and scan codes for most keyboards.  To
  19613.               insert a delay in the keystroke sequence, include a word set
  19614.               to FFFFh followed by a word containing the desired delay in
  19615.               clock ticks.
  19616.  
  19617.  
  19618.           Writing Installable Commands
  19619.  
  19620.               An "installable command" is created with a memory-resident
  19621.               program (TSR) which can receive signals from 4DOS and process
  19622.               commands.  4DOS makes every command available to such TSRs
  19623.               before it is executed; if any TSR chooses to execute the
  19624.               command, 4DOS will do no further processing.  Otherwise, 4DOS
  19625.               processes the command normally.
  19626.  
  19627.               The 4DOS "Installable command" interface is compatible with an
  19628.               undocumented interface present in COMMAND.COM for MS-DOS and
  19629.               PC-DOS 3.3 and above.  This interface is documented more
  19630.               thoroughly on pages 373 - 379 of the excellent reference text
  19631.               Undocumented DOS by Schulman et. al., published by Addison
  19632.               Wesley (ISBN 0-201-57064-5).
  19633.  
  19634.               4DOS looks for an installable command after alias expansion
  19635.               and after checking to see if the command is a drive change,
  19636.               but before checking for an internal or external command.
  19637.  
  19638.               4DOS first makes an INT 2Fh call to determine whether any TSR
  19639.               loaded will respond to the command, with:
  19640.  
  19641.                     AX = AE00h
  19642.                     BX = offset of command line buffer:
  19643.                            first byte = maximum length of command line (128)
  19644.                            second byte = actual length of command line, not
  19645.                               including trailing CR
  19646.                            remainder = command line, with a trailing CR
  19647.                     CH = FFh
  19648.                     CL = length of command line, not including the command
  19649.  
  19650.  
  19651.           ___________________________________________________________________
  19652.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  337
  19653.  
  19654.                                            APPENDIX C / TECHNICAL INFORMATION
  19655.           ___________________________________________________________________
  19656.  
  19657.  
  19658.                          name
  19659.                     DX = FFFFh
  19660.                     SI = offset of command name buffer:
  19661.                            first byte = length of command name
  19662.                            remainder = command name, shifted to upper case
  19663.                               and padded with blanks to 11 characters
  19664.                     DI = 0
  19665.  
  19666.               If the TSR does not recognize the command as its own, it must
  19667.               pass the INT 2Fh along with registers unchanged.  If it does
  19668.               recognize the command, it must return 0FFh in AL.  The command
  19669.               should not be executed at this point.  4DOS will then make
  19670.               another call (buffer formats are the same as above):
  19671.  
  19672.                     AX = AE01h
  19673.                     BX = offset of command line buffer
  19674.                     CH = 0
  19675.                     CL = length of command name
  19676.                     DX = FFFFh
  19677.                     SI = offset of command name buffer
  19678.  
  19679.               If the TSR executed the command line, it must set the command
  19680.               name length (DS:[SI]) to 0.  If the command name length is not
  19681.               0, 4DOS will attempt to execute the command as an internal or
  19682.               external command.  This allows the TSR to return a modified
  19683.               command line to 4DOS by modifying the command line buffer at
  19684.               DS:BX, and leaving the command name length byte at DS:[SI] set
  19685.               to a non-zero value.  If the command is executed, the TSR
  19686.               should return the result of the command (zero for normal
  19687.               return or non-zero for an error) in AL.
  19688.  
  19689.  
  19690.           Using DESCRIPT.ION
  19691.  
  19692.               4DOS uses the file DESCRIPT.ION to store file descriptions.
  19693.               This file is created as a hidden file in each subdirectory
  19694.               which has descriptions, and deleted when all descriptions are
  19695.               removed or when all files with descriptions are deleted.
  19696.  
  19697.               Your programs can access DESCRIPT.ION to create, retrieve, or
  19698.               modify file descriptions, and to store other information.
  19699.               DESCRIPT.ION has one line per file, and is unsorted.  Each
  19700.               line is in the following format:
  19701.  
  19702.                    filename.ext Description[*<ID>Other program info]...<CR>
  19703.  
  19704.               There is normally one space between the description and
  19705.               filename but additional spaces may be used in future versions
  19706.  
  19707.  
  19708.           ___________________________________________________________________
  19709.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  338
  19710.  
  19711.                                            APPENDIX C / TECHNICAL INFORMATION
  19712.           ___________________________________________________________________
  19713.  
  19714.  
  19715.               of 4DOS.  The characters after the description allow extension
  19716.               of the description format for use by other programs.  They are
  19717.               as follows:
  19718.  
  19719.                    * represents an ASCII Ctrl-D (04), and marks the end of
  19720.                    the description text and the beginning of information for
  19721.                    a program other than 4DOS.  This symbol can appear
  19722.                    multiple times on each line; each occurrence marks the
  19723.                    beginning of information for another program.
  19724.  
  19725.                    <ID> is an identification byte for the program which is
  19726.                    using this area of the particular line.  If you are
  19727.                    writing a program which will store information in
  19728.                    DESCRIPT.ION, test it using an ID byte of your own
  19729.                    choosing.  When you are ready to release the program,
  19730.                    contact JP Software and we will provide you with an ID
  19731.                    byte value that is not in use by others to the best of
  19732.                    our knowledge.
  19733.  
  19734.                    Other program info is any text the program wishes to
  19735.                    store in its area of the line.  The text should relate
  19736.                    specifically to the file named on the line.  It may not
  19737.                    contain the u character, carriage returns, line feeds, or
  19738.                    nulls (ASCII 0s).
  19739.  
  19740.               4DOS will copy, delete, or move all the information on a line
  19741.               in DESCRIPT.ION, including  information owned by other
  19742.               programs, when performing the same action on the corresponding
  19743.               file.  4DOS will also change the name if a file is renamed.
  19744.               To support DESCRIPT.ION properly, your program must do the
  19745.               same if it copies, deletes, moves, or renames files.  Take
  19746.               care not to remove information which does not belong to your
  19747.               program, or delete lines which contain information for other
  19748.               programs.  Your program should be able to handle a line
  19749.               terminated by a CR or LF alone, a CR/LF pair, an EOF (ASCII
  19750.               26), or the physical end of the file.  The lines it creates
  19751.               should be terminated with CR / LF.  The line length limit is
  19752.               4096 bytes; exceeding this limit will cause unpredictable
  19753.               results.
  19754.  
  19755.  
  19756.           Interrupt 2E
  19757.  
  19758.               4DOS provides full, documented support for the undocumented
  19759.               COMMAND.COM "back door" entry, INT 2E (hex).  INT 2E allows
  19760.               applications to call the primary copy of the command processor
  19761.               to execute commands, without loading a secondary shell.
  19762.  
  19763.  
  19764.  
  19765.           ___________________________________________________________________
  19766.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  339
  19767.  
  19768.                                            APPENDIX C / TECHNICAL INFORMATION
  19769.           ___________________________________________________________________
  19770.  
  19771.  
  19772.               INT 2E support is enabled with the FullINT2E = Yes directive
  19773.               in 4DOS.INI.  If this directive is left out or is set to No,
  19774.               4DOS does "hook" INT 2E, but any calls to it are ignored.
  19775.               Setting FullINT2E = Yes adds about 100 bytes to the resident
  19776.               size of 4DOS, and applies only to the primary shell (it is
  19777.               ignored in secondary shells).
  19778.  
  19779.               To use INT 2E, set DS:SI to the address of a buffer containing
  19780.               the command, then issue an INT 2E.  The buffer format is:
  19781.  
  19782.                    First byte      Length of command, not including this
  19783.                                    byte or the last byte
  19784.                    Text bytes      The command text
  19785.                    Last byte       CR (ASCII 13)
  19786.  
  19787.               You must have enough memory available for 4DOS to reload its
  19788.               transient portion, and about 80 bytes of available stack space
  19789.               for the INT 2E handler to use.  INT 2E can not be called from
  19790.               a TSR while 4DOS is running (for example, a TSR popped up at
  19791.               the 4DOS prompt or from within LIST or SELECT), but can be
  19792.               called from within any application or from within a TSR while
  19793.               an application (including the 4DOS HELP system) is running.
  19794.  
  19795.               INT 2E can invoke any 4DOS command including an alias, an
  19796.               internal command, an external command, or a batch file.  All
  19797.               changes to 4DOS data (such as aliases, environment variables,
  19798.               and SETDOS settings) which are made by a command executed via
  19799.               INT 2E calls will affect the primary shell, and the
  19800.               environment passed to a program called via INT 2E will be a
  19801.               copy of the primary shell's environment.
  19802.  
  19803.               INT 2E uses the same internal stack (temporary storage area)
  19804.               as the primary shell.  If a complex command is used in the
  19805.               primary shell to start a program which eventually issues an
  19806.               INT 2E, the additional stack space required by commands
  19807.               executed through INT 2E may (in rare circumstances) cause a
  19808.               stack overflow.  If this occurs, use the StackSize directive
  19809.               in 4DOS.INI (see page 137) to increase 4DOS's internal stack
  19810.               space.
  19811.  
  19812.               INT 2E also uses the same batch file "stack" as the primary
  19813.               shell.  This means that if INT 2E is used to execute a batch
  19814.               file, this batch file is considered "nested" within any batch
  19815.               file(s) used in the primary shell to start the program which
  19816.               issued the INT 2E.  This may cause batch nesting errors from
  19817.               within the INT 2E call which would not occur if the same
  19818.               command were executed at the prompt.  For example, suppose an
  19819.               application is loaded from batch files nested six levels deep,
  19820.  
  19821.  
  19822.           ___________________________________________________________________
  19823.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  340
  19824.  
  19825.                                            APPENDIX C / TECHNICAL INFORMATION
  19826.           ___________________________________________________________________
  19827.  
  19828.  
  19829.               and that application uses INT 2E to execute a command which
  19830.               invokes batch files which nest to five levels deep.  Under
  19831.               these conditions a nesting error will occur, because the total
  19832.               nesting level is eleven, exceeding 4DOS's limit of ten levels
  19833.               of nested batch files.
  19834.  
  19835.               On return from INT 2E all registers will be destroyed except
  19836.               SS and SP.  AX will be set as follows:
  19837.  
  19838.                  FFFFh   An error occurred before processing the command: not
  19839.                          enough memory was available, INT 2E was called from
  19840.                          a TSR, or another error made it impossible to handle
  19841.                          the interrupt.
  19842.  
  19843.                  0       The command was processed without error.
  19844.  
  19845.                  > 0     There was an error in processing the command.  AX is
  19846.                          the error number, equivalent to the IERRORLEVEL
  19847.                          (%_?) value from an internal command or the
  19848.                          ERRORLEVEL (%?) value from an external command.  If
  19849.                          a batch file is run the value will be the error
  19850.                          level returned by the batch file (via QUIT n or
  19851.                          CANCEL n) or the last command within it.  If an
  19852.                          alias is run the value will be the error level
  19853.                          returned by the last command in the alias.
  19854.  
  19855.  
  19856.  
  19857.  
  19858.  
  19859.  
  19860.  
  19861.  
  19862.  
  19863.  
  19864.  
  19865.  
  19866.  
  19867.  
  19868.  
  19869.  
  19870.  
  19871.  
  19872.  
  19873.  
  19874.  
  19875.  
  19876.  
  19877.  
  19878.  
  19879.           ___________________________________________________________________
  19880.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  341
  19881.  
  19882.                                                                      GLOSSARY
  19883.           ___________________________________________________________________
  19884.  
  19885.  
  19886.  
  19887.           GLOSSARY
  19888.  
  19889.  
  19890.           Some items in this glossary refer to 4DOS features.  For more
  19891.           information on how a particular feature works, look the feature up
  19892.           in the index under the name used here.
  19893.  
  19894.               4DOS.INI:  The 4DOS initialization file containing directives
  19895.               which set 4DOS's startup configuration parameters.
  19896.  
  19897.               4EXIT:  A batch file which is executed whenever a secondary
  19898.               4DOS shell ends.
  19899.  
  19900.               4START:  A batch file which is executed whenever 4DOS is
  19901.               started, either as a primary shell or a secondary shell.
  19902.  
  19903.               Alias:  A shorthand name for a command or series of commands.
  19904.  
  19905.               Alias Argument:  A numeric variable included in an alias
  19906.               definition, allowing a different value to be used in the alias
  19907.               each time it is executed.
  19908.  
  19909.               AND:  A logical combination of two true or false conditions
  19910.               such that if both conditions are true the result is true; if
  19911.               either condition is false the result is false.
  19912.  
  19913.               ANSI.SYS:  A device driver supplied with DOS which provides
  19914.               enhanced screen display and keyboard macros, or one of the
  19915.               many similar programs.
  19916.  
  19917.               Append:  Concatenation of one file or string onto the end of
  19918.               another.  (There is also a DOS external command, APPEND, which
  19919.               has an entirely different meaning and which should be used
  19920.               with caution!)
  19921.  
  19922.               Application:  A program run from the command prompt or a batch
  19923.               file.  The term is used broadly to mean any program other than
  19924.               the command processor; and more narrowly to mean a program
  19925.               with a specific purpose such as a spreadsheet or word
  19926.               processing program, as opposed to a utility.
  19927.  
  19928.               Archive:  A file attribute indicating that the file has been
  19929.               modified since the last backup (presuming that the last backup
  19930.               cleared the archive attribute, as most backup programs do).
  19931.               Also sometimes used to refer to a single file which contains a
  19932.               number of other files in compressed form.
  19933.  
  19934.  
  19935.  
  19936.           ___________________________________________________________________
  19937.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  342
  19938.  
  19939.                                                                      GLOSSARY
  19940.           ___________________________________________________________________
  19941.  
  19942.  
  19943.               Argument:  A piece of additional information placed after a
  19944.               command or function name.  For example in the command DIR XYZ,
  19945.               XYZ is an argument.  Also used to refer to an alias argument
  19946.               or batch file argument.
  19947.  
  19948.               ASCII:  The American Standard Code for Information
  19949.               Interchange, which defines numeric values for 128 different
  19950.               characters comprising the English alphabet, numbers,
  19951.               punctuation, and some control characters.
  19952.  
  19953.               ASCII File:  A file containing ASCII text, as opposed to a
  19954.               binary file which may contain codes, numbers, or other
  19955.               information that cannot be sensibly interpreted as text.
  19956.  
  19957.               Attribute:  A characteristic of a file which can be set or
  19958.               cleared.  The standard attributes are Read-Only, Hidden,
  19959.               System, and Archive.  The special attributes Volume Label and
  19960.               Directory are also used for files of those types.
  19961.  
  19962.               AUTOEXEC.BAT:  A batch file which is AUTOmatically EXECuted
  19963.               when the computer is started.
  19964.  
  19965.               Automatic Directory Change:  A 4DOS feature which allows
  19966.               changing directories by typing the directory name and a
  19967.               backslash [\] at the prompt.
  19968.  
  19969.               Base Memory:  The portion of your computer's memory available
  19970.               for use by DOS, the command processor, and application
  19971.               programs.  On most PCs this area consists of the first 640K
  19972.               bytes of the computer's memory (one K is 1024 bytes).
  19973.  
  19974.               BAT File:  Same as a Batch File.
  19975.  
  19976.               Batch File:  A text file containing a sequence of DOS or 4DOS
  19977.               commands.  Batch files are used to save command sequences so
  19978.               that they can be re-executed at any time, transferred to
  19979.               another system, etc.
  19980.  
  19981.               Batch File Argument:  A numeric variable used within a batch
  19982.               file, allowing a different value to be used at that spot in
  19983.               the file each time it is executed.
  19984.  
  19985.               Binary File:  A file containing information which does not
  19986.               represent or cannot sensibly be interpreted as text.  See also
  19987.               ASCII File.
  19988.  
  19989.               Block Device:  A physical device for input or output which can
  19990.               transmit or receive large blocks of data while the computer is
  19991.  
  19992.  
  19993.           ___________________________________________________________________
  19994.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  343
  19995.  
  19996.                                                                      GLOSSARY
  19997.           ___________________________________________________________________
  19998.  
  19999.  
  20000.               engaged in other activities.  Examples include disk, tape, and
  20001.               CD-ROM drives, and many networks.
  20002.  
  20003.               Boot:  The process of starting the computer and loading DOS
  20004.               and the command processor into memory.
  20005.  
  20006.               Boot Directory:  The current directory at the time the system
  20007.               is booted, almost always the root directory of the boot drive.
  20008.  
  20009.               Boot Drive:  The disk drive that the system is booted from,
  20010.               usually A: (the floppy disk) or C: (the hard disk).
  20011.  
  20012.               Break: A signal sent to a program (including 4DOS) to tell it
  20013.               to halt what it is doing.  The Ctrl-C key  or Ctrl-Break key
  20014.               is used to send this signal.  Some external commands abort
  20015.               when they receive a break signal; others return to a previous
  20016.               screen or menu, or abort the current operation.
  20017.  
  20018.               BTM File:  A special type of batch file which is loaded into
  20019.               memory, dramatically speeding up execution.
  20020.  
  20021.               Buffer:  An area of memory set aside for storage.  Usually
  20022.               refers to disk buffers, used to save information as it is
  20023.               transferred between your program and the disk; or to the
  20024.               keyboard buffer, which holds keystrokes until a program can
  20025.               use them.
  20026.  
  20027.               Character Device:  A physical device for input or output which
  20028.               must communicate with your computer one character at a time.
  20029.               Examples include the console, communications ports, and
  20030.               printers.
  20031.  
  20032.               Code Page:  A set of definitions which tells DOS how to get
  20033.               and display date, time, and other information in the format
  20034.               appropriate to a particular country.
  20035.  
  20036.               Command Completion:  A 4DOS feature which allows you to recall
  20037.               a previous command by typing the first few letters of the
  20038.               command, then an up-arrow or down-arrow.
  20039.  
  20040.               Command Echoing:  A feature which displays commands as they
  20041.               are executed.  Echoing can be turned on and off.
  20042.  
  20043.               Command History:  A 4DOS feature which retains commands you
  20044.               have previously executed, so that they can be modified and re-
  20045.               executed later.
  20046.  
  20047.  
  20048.  
  20049.  
  20050.           ___________________________________________________________________
  20051.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  344
  20052.  
  20053.                                                                      GLOSSARY
  20054.           ___________________________________________________________________
  20055.  
  20056.  
  20057.               Command Interpreter:  A program, such as 4DOS or COMMAND.COM,
  20058.               which interprets commands and executes other programs.
  20059.  
  20060.               Command Recall:  See Command History.
  20061.  
  20062.               Command Tail:  The portion of a command consisting of all the
  20063.               arguments, i.e. everything but the command name itself.
  20064.  
  20065.               Compound Command:  See Multiple Commands.
  20066.  
  20067.               COMSPEC:  An environment variable which defines where to get
  20068.               the command processor for a secondary shell.
  20069.  
  20070.               Conditional Commands:  A 4DOS feature allowing commands to be
  20071.               executed or skipped depending on the results of a previous
  20072.               command.   See also Exit Code.
  20073.  
  20074.               CONFIG.SYS:  A file which tells DOS what device drivers to
  20075.               install, what command processor to use, and other information
  20076.               about what to do when your system boots.  See your DOS manual
  20077.               for more information.
  20078.  
  20079.               Console:  The PC keyboard and display.
  20080.  
  20081.               Control Character:  A character which is part of the ASCII
  20082.               code, but does not have a normal text representation, and
  20083.               which can be generated by pressing the Ctrl key along with
  20084.               another key.  For example the control character called "BEL"
  20085.               is generated by pressing Ctrl-G, and will cause the computer
  20086.               to beep if pressed at the DOS prompt.
  20087.  
  20088.               Country Code:  See Code Page.
  20089.  
  20090.               CR:  The ASCII character "carriage return", generated by
  20091.               pressing the "Enter" key on the keyboard, and stored in most
  20092.               ASCII files at the end of each line.
  20093.  
  20094.               Critical Error:  An error, usually related to input, output,
  20095.               or network access, which prevents a program from continuing.
  20096.               When a critical error occurs, a prompt such as "R(etry),
  20097.               I(gnore), F(ail), or A(bort)" appears on the screen and you
  20098.               must decide what action to take.
  20099.  
  20100.               Current Directory:  The directory in which all file operations
  20101.               will take place unless otherwise specified.  For example if
  20102.               the current directory is C:\MYFILES then the command "DEL XYZ"
  20103.               will delete the file XYZ in the directory C:\MYFILES, and will
  20104.  
  20105.  
  20106.  
  20107.           ___________________________________________________________________
  20108.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  345
  20109.  
  20110.                                                                      GLOSSARY
  20111.           ___________________________________________________________________
  20112.  
  20113.  
  20114.               not affect other files with the same name which may be in
  20115.               other directories.
  20116.  
  20117.               Description:  A string of characters assigned to describe a
  20118.               file with the 4DOS DESCRIBE command.
  20119.  
  20120.               Destination:  In the 4DOS file commands (COPY, MOVE, and
  20121.               RENAME), the name or directory files should have after any
  20122.               copying or modification has taken place; generally referred to
  20123.               by the last specification on the command line.  See also
  20124.               Source.
  20125.  
  20126.               Device:  A physical device for input or output such as the
  20127.               console, a communications port, or a printer.  Sometimes the
  20128.               term "device" alone is used to refer to character devices such
  20129.               as those listed above, and excludes block devices.
  20130.  
  20131.               Device Driver:  A program which allows DOS to communicate with
  20132.               a device, and which is loaded into memory when the system is
  20133.               booted, via a statement in CONFIG.SYS.  Some device drivers
  20134.               are used to manage memory or for other similar internal
  20135.               functions, rather than to communicate with an external device.
  20136.  
  20137.               Directory:  A portion of any disk, identified by a name and a
  20138.               relationship to other directories in a "tree" structure, with
  20139.               the tree starting at the root directory.  A directory
  20140.               separates files on the disk into logical groups, but does not
  20141.               represent a physical division of the data on the disk.
  20142.  
  20143.               Disk Swapping:  A type of swapping in which the transient
  20144.               portion of 4DOS is stored on disk while an application is
  20145.               running.
  20146.  
  20147.               DOS Memory:  See Base Memory.
  20148.  
  20149.               Echo:  See Command Echoing.
  20150.  
  20151.               EMS Memory:  Memory which conforms to the Lotus - Intel -
  20152.               Microsoft Expanded Memory Specification (LIM EMS).  This
  20153.               hardware/software standard allows programs to access large
  20154.               amounts of memory outside of base memory or extended memory.
  20155.               Most systems which have EMS memory have either a specific EMS
  20156.               board (on any PC or compatible system), EMS emulation software
  20157.               (on PC-AT compatible systems), or a 386 control program such
  20158.               as QEMM or 386MAX (on 386 systems).  If you do not have one of
  20159.               these items, you probably do not have EMS memory.
  20160.  
  20161.  
  20162.  
  20163.  
  20164.           ___________________________________________________________________
  20165.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  346
  20166.  
  20167.                                                                      GLOSSARY
  20168.           ___________________________________________________________________
  20169.  
  20170.  
  20171.               EMS Swapping:  A type of swapping in which the transient
  20172.               portion of 4DOS is stored in EMS memory while an application
  20173.               is running.
  20174.  
  20175.               Environment:  An area of memory which contains multiple
  20176.               entries in the form "NAME=value".  Each entry is called an
  20177.               environment variable.  See also Master Environment and Passed
  20178.               Environment.
  20179.  
  20180.               Environment Variable:  The name of a single entry in the
  20181.               environment.  Environment variables are entered with the SET
  20182.               command, and used to associate the specified value with the
  20183.               specified name for any purpose desired by the user.
  20184.               Typically, their function is to set default switches for a
  20185.               program, specify a directory path where files can be found,
  20186.               and so on.  When 4DOS encounters an environment variable name
  20187.               in a command in the form "%NAME" (or "%NAME%"), it substitutes
  20188.               the corresponding value in its place.
  20189.  
  20190.               Errorlevel:  A numeric value between 0 and 255 returned from
  20191.               an external command to indicate its result (e.g., success,
  20192.               failure, response to a question), and accessible via the IF
  20193.               ERRORLEVEL command and the %? environment variable.  See also
  20194.               Exit Code.
  20195.  
  20196.               Escape Character:  This term has two meanings.  In some
  20197.               contexts it means the 4DOS escape character, normally Ctrl-X,
  20198.               which is used to suppress the normal meaning of or give
  20199.               special meaning to the following character.  In other cases it
  20200.               refers to the specific ASCII character ESC.  The meaning must
  20201.               be determined from the context.
  20202.  
  20203.               Executable Extensions:  A 4DOS feature which allows you to
  20204.               specify the application to be executed when a file with a
  20205.               particular extension is named at the command prompt.
  20206.  
  20207.               Executable File:  A file with the extension .COM or .EXE,
  20208.               which can be loaded into memory and run as a program.
  20209.  
  20210.               Exit Code:  The error level returned by an external command,
  20211.               or a similar exit code returned by a 4DOS internal command.
  20212.               4DOS internal commands return an exit code of 0 if successful,
  20213.               or non-zero if unsuccessful.  See also Errorlevel.
  20214.  
  20215.               Expansion:  The process 4DOS goes through when it scans a
  20216.               command line and substitutes the appropriate actual values for
  20217.               aliases, alias arguments, batch file arguments, and
  20218.               environment variables.  See also Parsing.
  20219.  
  20220.  
  20221.           ___________________________________________________________________
  20222.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  347
  20223.  
  20224.                                                                      GLOSSARY
  20225.           ___________________________________________________________________
  20226.  
  20227.  
  20228.               Extended ASCII Character:  A character which is not part of
  20229.               the standard set of 128 ASCII characters, but is used on the
  20230.               PC as part of an extended set of 256 characters.  These
  20231.               characters include international language symbols, and box and
  20232.               line drawing characters.
  20233.  
  20234.               Extended Memory:  Any memory on a 286-based (PC-AT compatible)
  20235.               or 386-based computer system which is above the 1 MB (one
  20236.               megabyte, or 1024*1024 bytes) of memory that DOS can address
  20237.               directly.  Any PC-AT compatible or 386 system with more than
  20238.               640K of memory has extended memory.  This memory can be used
  20239.               for a variety of purposes depending on the software installed
  20240.               to utilize it.  See also XMS.
  20241.  
  20242.               External Command:  A program which resides in an executable
  20243.               file, as opposed to an internal command which is part of the
  20244.               command processor.  For example, FORMAT and DISKCOPY are
  20245.               external commands; you can find them on your DOS disk under
  20246.               the names FORMAT.COM and DISKCOPY.COM.
  20247.  
  20248.               File Attribute:  See Attribute.
  20249.  
  20250.               File Description:  See Description.
  20251.  
  20252.               Filename Completion:  A 4DOS feature which allows you to type
  20253.               part of a filename on the command line, and have 4DOS fill in
  20254.               the rest for you.
  20255.  
  20256.               Free Memory:  Usually, the amount of base memory which is
  20257.               currently unoccupied and available for use by applications.
  20258.  
  20259.               Hidden:  A file attribute indicating that the file should not
  20260.               be displayed with a normal DIR command, and should not be
  20261.               available for access by programs unless they specifically
  20262.               request use of hidden files.
  20263.  
  20264.               History:  See Command History.
  20265.  
  20266.               History Window:  A pop-up window used by 4DOS to display the
  20267.               command history, allowing you to choose a previous command to
  20268.               modify and / or execute.
  20269.  
  20270.               Include List:  A concise method of specifying several files or
  20271.               groups of files in the same directory, for use with all 4DOS
  20272.               commands which take file names as arguments.
  20273.  
  20274.               Insert Mode:  When editing text, a mode in which newly typed
  20275.               characters are inserted into the line at the cursor position,
  20276.  
  20277.  
  20278.           ___________________________________________________________________
  20279.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  348
  20280.  
  20281.                                                                      GLOSSARY
  20282.           ___________________________________________________________________
  20283.  
  20284.  
  20285.               rather than overwriting existing characters on the line.  See
  20286.               also Overstrike Mode.
  20287.  
  20288.               Internal Command:  A command which is part of the command
  20289.               processor, as opposed to an external command.  For example,
  20290.               DIR and COPY are internal commands.
  20291.  
  20292.               Keyboard Buffer:  A buffer which holds keystrokes you have
  20293.               typed that have not yet been used by the currently executing
  20294.               program.
  20295.  
  20296.               Keystroke Alias:  An alias assigned to a key, so that it can
  20297.               be invoked or recalled with a single keystroke.
  20298.  
  20299.               Label:  A marker in a batch file.  Labels allow GOTO and GOSUB
  20300.               commands to "jump" to the command on the line following the
  20301.               label.  See also Volume Label.
  20302.  
  20303.               LF:  The ASCII character "line feed", not usually generated
  20304.               from the keyboard, but stored in most ASCII files at the end
  20305.               of each line after the CR character.
  20306.  
  20307.               Master Environment:  The master copy of the environment
  20308.               maintained by the command processor.  The master environment
  20309.               is manipulated with the SET, ESET, and UNSET commands.
  20310.  
  20311.               Memory Resident Mode:  A method of installing 4DOS in which
  20312.               swapping is disabled, and all of 4DOS remains permanently
  20313.               resident in memory.  Memory-resident mode requires much more
  20314.               memory than the normal swapping mode.
  20315.  
  20316.               Modulo:  The remainder after an integer division.  For example
  20317.               11 modulo 3 is 2, because when 11 is divided by 3 the
  20318.               remainder is 2.
  20319.  
  20320.               Multiple Commands:  A 4DOS feature which allows multiple
  20321.               commands to be placed on a line, separated by a caret (^) or
  20322.               other user-defined character.
  20323.  
  20324.               Multitasking:  A capability of some software (and the related
  20325.               hardware) which allows two or more programs to run apparently
  20326.               simultaneously on the same computer.  Multitasking software
  20327.               for PC compatible systems includes programs like DESQview.
  20328.  
  20329.               Non-Swapping Mode:  See Memory Resident Mode.
  20330.  
  20331.               Option:  See Switch.
  20332.  
  20333.  
  20334.  
  20335.           ___________________________________________________________________
  20336.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  349
  20337.  
  20338.                                                                      GLOSSARY
  20339.           ___________________________________________________________________
  20340.  
  20341.  
  20342.               OR:  A logical combination of two true or false conditions
  20343.               such that if both conditions are false the result is false; if
  20344.               either condition is true the result is true.
  20345.  
  20346.               Overstrike Mode:  When editing text, a mode in which newly
  20347.               typed characters overwrite existing characters on the line,
  20348.               rather than being inserted into the line at the cursor
  20349.               position.  See also Insert Mode.
  20350.  
  20351.               Parameter:  See Argument.
  20352.  
  20353.               Parsing:  The process 4DOS performs when it analyzes the
  20354.               command line, performs alias and environment variable
  20355.               expansion, and finds the appropriate internal command or
  20356.               external command to execute.
  20357.  
  20358.               Passed Environment:  A copy of the master environment created
  20359.               before running an application, so that any changes made by the
  20360.               application will not affect the master environment.  The size
  20361.               of the passed environment is determined by the amount of space
  20362.               actually used in the master environment when the application
  20363.               is started.
  20364.  
  20365.               Path:  A specification of the directories a file resides in,
  20366.               including all parent directories.  For example, the path for
  20367.               C:\WPFILES\MYDIR\MEMO.TXT is C:\WPFILES\MYDIR\.  Path is also
  20368.               used to refer to the environment variable PATH, which contains
  20369.               a series of path specifications used when searching for
  20370.               external commands and batch files.
  20371.  
  20372.               Pipe:  A method for collecting the standard output of one
  20373.               program and passing it on as the standard input of the next
  20374.               program to be executed, signified by a vertical bar "|" on the
  20375.               command line. See also Redirection.
  20376.  
  20377.               Primary Shell:  The copy of the command processor which is
  20378.               loaded when the system boots.
  20379.  
  20380.               RAM Disk:  A pseudo "disk drive", created by software, which
  20381.               appears like a normal physical disk drive to programs.  RAM
  20382.               disks can be stored in extended memory, XMS memory, EMS
  20383.               memory, or base memory, and provide a convenient way for
  20384.               programs to use this memory for temporary files.
  20385.  
  20386.               Read-Only:  A file attribute indicating that the file can be
  20387.               read, but not written by DOS and 4DOS.
  20388.  
  20389.  
  20390.  
  20391.  
  20392.           ___________________________________________________________________
  20393.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  350
  20394.  
  20395.                                                                      GLOSSARY
  20396.           ___________________________________________________________________
  20397.  
  20398.  
  20399.               Reboot:  The process of restarting the computer, usually by
  20400.               pressing the Ctrl, Alt, and Del keys simultaneously.
  20401.  
  20402.               Redirection:  A method for collecting the standard output of a
  20403.               program in a file, and/or of providing the standard input for
  20404.               a program from a file, signified respectively by a greater
  20405.               than symbol ">" or less than symbol "<" on the command line.
  20406.               See also Pipe.
  20407.  
  20408.               Replaceable Parameter:  See Alias Argument and Batch File
  20409.               Argument.
  20410.  
  20411.               Resident Portion:  The small portion of 4DOS stored
  20412.               permanently in memory when swapping mode is in use, as opposed
  20413.               to the larger transient portion.  The resident portion is
  20414.               stored as close as possible to the beginning of base memory.
  20415.  
  20416.               Root Directory:  The first directory, from which all other
  20417.               directories are "descended."  The root directory is referenced
  20418.               with a single backslash (\).  When a disk is first formatted,
  20419.               it is the only directory.
  20420.  
  20421.               Secondary Shell:  Any copy of any command processor which is
  20422.               loaded after the system boots.  Secondary shells may be
  20423.               started from the command line; by executing a "shell to DOS"
  20424.               operation from within an application; implicitly by executing
  20425.               some DOS-related functions within certain applications; or by
  20426.               starting a new partition in a multi-tasking or task switching
  20427.               system.
  20428.  
  20429.               Shell:  A command processor.  Also used to refer to a program
  20430.               which gives access to DOS functions and commands through a
  20431.               menu- or mouse-driven system.
  20432.  
  20433.               Source:  In the 4DOS file commands (COPY, MOVE, and RENAME),
  20434.               the original files before any copying or modification has
  20435.               taken place, i.e. those specified earlier on the command line.
  20436.               See also Target.
  20437.  
  20438.               Stack:  An area of memory used by any program to store
  20439.               temporary data while the program is running; more generally,
  20440.               any such storage area where the last item stored is normally
  20441.               the first one removed.
  20442.  
  20443.               Standard Error:  A file or character device where error
  20444.               messages from a program are displayed.  Standard error output
  20445.               always goes to the console, unless redirection is used.
  20446.  
  20447.  
  20448.  
  20449.           ___________________________________________________________________
  20450.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  351
  20451.  
  20452.                                                                      GLOSSARY
  20453.           ___________________________________________________________________
  20454.  
  20455.  
  20456.               Standard Input:  A file or character device where a program
  20457.               obtains its normal input.  Standard input always comes from
  20458.               the console, unless redirection is used.
  20459.  
  20460.               Standard Output:  A file or character device where normal
  20461.               output from a program is displayed.  Standard output always
  20462.               goes to the console, unless redirection is used.
  20463.  
  20464.               Subdirectory:  Any directory other than the root directory.
  20465.               See also Root Directory.
  20466.  
  20467.               Swap File:  A disk file created by 4DOS to store its transient
  20468.               portion when disk swapping is in use.
  20469.  
  20470.               Swapping:  A 4DOS feature which removes the larger transient
  20471.               portion of 4DOS from base memory while an application is
  20472.               running, leaving the maximum possible amount of memory for the
  20473.               application, and allows 4DOS to restore information such as
  20474.               the command history after the application is finished.  See
  20475.               also XMS Swapping, EMS Swapping, and Disk Swapping.
  20476.  
  20477.               Switch:  An argument to an internal command or application
  20478.               which specifies a particular behavior or setting.  For
  20479.               example, the command "DIR /P" might be referred to as "having
  20480.               the /P switch set".  Also, a configuration value for 4DOS
  20481.               specified on the SHELL= line in CONFIG.SYS.
  20482.  
  20483.               System:  A file attribute indicating that the file belongs to
  20484.               DOS and should not be accessed by normal programs.
  20485.  
  20486.               Target:  See Destination.
  20487.  
  20488.               Transient Portion:  The larger portion of 4DOS stored in
  20489.               memory temporarily when swapping mode is in use, as opposed to
  20490.               the smaller resident portion.  The transient portion is stored
  20491.               as close as possible to the end of base memory, and releases
  20492.               the space it is using whenever an application is executed.
  20493.  
  20494.               TSR:  A Terminate and Stay Resident program, i.e. a program
  20495.               which "terminates" but remains resident in base memory, to
  20496.               provide capabilities such as network support, a pop-up notepad
  20497.               or telephone dialer, a disk cache, or mouse support.
  20498.  
  20499.               UMB:  An XMS Upper Memory Block, whose address is above the
  20500.               end of normal base memory, but is within the 1 megabyte of
  20501.               memory that DOS can address directly.
  20502.  
  20503.  
  20504.  
  20505.  
  20506.           ___________________________________________________________________
  20507.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  352
  20508.  
  20509.                                                                      GLOSSARY
  20510.           ___________________________________________________________________
  20511.  
  20512.  
  20513.               Variable:  See Alias Argument, Batch File Argument, and
  20514.               Environment Variable.
  20515.  
  20516.               Volume Label:  A special, hidden file placed on any disk whose
  20517.               name constitutes a "label" for the entire disk.
  20518.  
  20519.               White Space Character:  Generally, a character used to
  20520.               separate arguments on the command line.  The white space
  20521.               characters recognized by 4DOS are the space, tab, comma,
  20522.               semicolon, and equal sign.
  20523.  
  20524.               Wildcard:  A character ("*" or "?") used in a filename to
  20525.               specify the possibility that any single character ("?") or
  20526.               sequence of characters ("*") can occur at that point in the
  20527.               actual name.
  20528.  
  20529.               XMS Memory:  A software method for accessing extended memory
  20530.               on 286 and 386 systems (and some systems which support version
  20531.               4.0 of the EMS memory specification).  XMS memory is not
  20532.               additional memory, but is a software specification only.  Its
  20533.               use generally requires Microsoft's HIMEM.SYS be installed as a
  20534.               device driver, or that another program such as 386MAX or MOVE-
  20535.               EM be used.
  20536.  
  20537.               XMS Swapping:  A type of swapping where the transient portion
  20538.               of 4DOS is stored in XMS memory while an application is
  20539.               running.
  20540.  
  20541.               XOR (exclusive OR):  A logical combination of two true or
  20542.               false conditions such that if both conditions are false or
  20543.               both conditions are true the result is false; if either
  20544.               condition is true and the other is false the result is true.
  20545.  
  20546.  
  20547.  
  20548.  
  20549.  
  20550.  
  20551.  
  20552.  
  20553.  
  20554.  
  20555.  
  20556.  
  20557.  
  20558.  
  20559.  
  20560.  
  20561.  
  20562.  
  20563.           ___________________________________________________________________
  20564.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  353
  20565.  
  20566.                                                                         INDEX
  20567.           ___________________________________________________________________
  20568.  
  20569.  
  20570.           INDEX                               ? internal variable, 81
  20571.                                               _? internal variable, 81
  20572.  
  20573.           Most fully capitalized terms        @ sign, see also Variable
  20574.           (e.g. ECHO, SELECT) are 4DOS         functions
  20575.           command names unless otherwise         for key codes
  20576.           noted.                                    in 4DOS.INI, 123
  20577.                                                     in a keystroke alias, 173
  20578.                                                     in KEYSTACK text, 251
  20579.             -- Special Characters --             in file names, 47
  20580.           ! warning mark, 2, 167                 in INKEY results, 246
  20581.                                                  to define a keystroke alias,
  20582.           ## advanced topic mark, 2, 54,          172
  20583.            166                                   to override batch file echo,
  20584.                                                   99, 215, 280
  20585.           % sign                                 to override command history
  20586.              in file names, 47                    save, 57
  20587.              use with environment                to read a file in FOR, 223
  20588.               variables, 78, 79
  20589.              use with replaceable             || (or) in conditional
  20590.               parameters, 94, 100, 175         commands, 91
  20591.              use with variable functions,
  20592.               85
  20593.           %# and %n&                               -- 4 --
  20594.              in aliases, 175
  20595.              in batch files, 100, 299         4DOS
  20596.           %0 to %127                             and DESQView, see DESQView
  20597.              in aliases, 175                     and DOS versions, 113, 149
  20598.              in batch files, 100, 299            and DR-DOS, 50, 110, 113,
  20599.                                                   149
  20600.           && (and) in conditional                and MS-DOS 5.0, 64, 113
  20601.            commands, 91                          and MS-DOS 5.0 memory
  20602.                                                   management, 50, 140, 141,
  20603.           * (asterisk)                            254
  20604.              as file name "wildcard", 71         and other software, 148
  20605.              in alias name, 172                  and Windows, see Microsoft
  20606.              in alias value, 170                  Windows
  20607.              to temporarily disable an           configuration, 80, 109, 118
  20608.               alias, 62, 105, 171                detecting, 335
  20609.                                                  Features, 9
  20610.           ., see Current directory               memory usage, 125, 127, 136
  20611.           .., see Parent directory               programming interface, 335
  20612.                                                  resident portion, 125
  20613.           /, in command switches, 165               loading in high memory,
  20614.                                                      127
  20615.           ? as file name "wildcard", 71          startup options, see Startup
  20616.           ? command, 168                          options
  20617.                                                  transient portion, 125, 136
  20618.  
  20619.  
  20620.           ___________________________________________________________________
  20621.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  354
  20622.  
  20623.                                                                         INDEX
  20624.           ___________________________________________________________________
  20625.  
  20626.  
  20627.           4DOS Utility Disk, 235              Aliases, 96, 169
  20628.           4DOS.COM, 113, 115                     and QUIT, 276
  20629.           4DOS.INI, 109, 118                     asterisk in name, 172
  20630.              advanced directives, 135            asterisk in value, 170
  20631.              and installation, 118               back quotes in, 96, 169,
  20632.              and SETDOS, 120, 127, 294            170, 175
  20633.              color directives, 130               commands for, 163
  20634.              comments in, 119                    defining default command
  20635.              configuration directives,            options with, 171, 175
  20636.               127                                editing, 219
  20637.              directive types, 121                examples, 96, 103, 105
  20638.              directives, 119, see also           IFF in, 175
  20639.               names of individual                in batch files, 103
  20640.               directives                         inheritance in secondary
  20641.              errors in, 119, 125                  shells, 136, 176
  20642.              initialization directives,          internal variables in, 176
  20643.               124                                keystroke, 97, 172
  20644.              key mapping directives, 131            and key assignments, 131
  20645.              location of, 111, 113                  automatic execution of,
  20646.                 and multitaskers, 121                94, 98, 174
  20647.              primary section, 120                memory space for, 81, 124,
  20648.                 in alternate files, 121           262
  20649.              secondary section, 120              multiple commands in, 169
  20650.                 and DESQView, 154                nesting, 170
  20651.                 and multitaskers, 150            order of execution, 44
  20652.                 example, 137                     reading from a file, 177
  20653.           4DOS.PIF, 152                          removing, 308
  20654.           4EXIT, 43, 109, 117                    replaceable parameters in,
  20655.              location of, 117, 124                175, 176
  20656.           4OS2 product, 1                        saving in a file, 174
  20657.           4START, 43, 85, 109, 117               saving temporarily, 218, 298
  20658.              and multitaskers, 151               suspending execution of, 269
  20659.              and startup command, 112            temporarily disabling, 62,
  20660.              and TSRs, 117                        105, 171
  20661.              location of, 117, 124               variable functions in, 90,
  20662.           4StartPath directive, 124               176
  20663.           _4VER internal variable, 81         Alt-255, 55
  20664.                                               And (&&) in conditional
  20665.                                                commands, 91
  20666.                -- A --                        .AND., in IF and IFF, 238, 242,
  20667.                                                244
  20668.           Abort, Retry, Fail message, see     ANSI directive, 127, 144, 191,
  20669.            Critical errors                     192, 295
  20670.           AddFile directive, 133              ANSI driver, 53
  20671.           Advanced topic mark, see ##            and CLS, 190, 295
  20672.           ALIAS command, 162, 169                and COLOR, 192, 295
  20673.           Alias directive, 124                   and COLORDIR, 205
  20674.           _ALIAS internal variable, 81           and colors, 131
  20675.  
  20676.  
  20677.           ___________________________________________________________________
  20678.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  355
  20679.  
  20680.                                                                         INDEX
  20681.           ___________________________________________________________________
  20682.  
  20683.  
  20684.              and cursor problems, 143         Base memory, see Memory
  20685.              and DESQView, 154                Base name, see File names
  20686.              and PROMPT, 272                  .BAT files, 99, 257
  20687.              and scrolling, 143, 296          Batch files, 98
  20688.              and TEXT, 302                       aliases in, 103, 104
  20689.              detecting, 81, 144                  based on command history,
  20690.              escape sequences, 94, 272,           236
  20691.               302                                branching in, 232
  20692.              in CONFIG.SYS, 144                  calling, 183
  20693.              use by 4DOS, 127, 142               capturing output of, 106
  20694.           _ANSI internal variable, 81            chaining, 107, 183
  20695.           ANSI.COM, 144                          commands for, 101, 163
  20696.           ANSI.SYS, 144                          comments in, 280
  20697.           APPEND command, 149                    debugging, 105
  20698.           Appending files, 193                   displaying messages in, 215,
  20699.           Archive attribute, see File             217, 284, 285, 302, 313
  20700.            attributes                            echoing of commands, 99,
  20701.           Argument quoting, 94                    127, 215, 297
  20702.           Arguments, see replaceable             environment variables in,
  20703.            parameters                             100
  20704.           Arithmetic, 86                         internal variables in, 84,
  20705.           ASCII, 51, 325                          100
  20706.           @ASCII variable function, 85           keyboard input in, 246, 249
  20707.           Asterisk, see *                        labels in, 230, 232
  20708.           At sign, see @ sign                    modes, 99, 257
  20709.           ATTRIB, 178                            nesting, 82, 183
  20710.           @ATTRIB variable function, 86          order of execution, 44
  20711.           Attributes, see File attributes        replaceable parameters, 100,
  20712.           AUTOEXEC.BAT, 43, 109, 114              299
  20713.              and 4START, 117                     saving environment in, 218,
  20714.              and startup command, 112             298
  20715.              location of, 124                    screen display, 211, 213,
  20716.              running, 111                         214
  20717.              setting COMSPEC in, 111             subroutines, 230, 283
  20718.              speeding up, 300                    suspending execution of, 269
  20719.              starting KSTACK.COM, 15, 68,        temporary variables in, 101
  20720.               115, 250                           terminating, 184, 276
  20721.           AutoExecPath directive, 124            timing events in, 304
  20722.           Automatic batch files, 43              tips, 103
  20723.           Automatic directory changes,           variable functions in, 90,
  20724.            61, 116                                100
  20725.                                               _BATCH internal variable, 82
  20726.                                               BatchEcho directive, 99, 127,
  20727.                -- B --                         297
  20728.                                               BEEP, 101, 127, 180
  20729.           Back & Forth, 113, 121              BeepFreq directive, 127
  20730.           Backspace character, 94             BeepLength directive, 128
  20731.           Backspace directive, 132            BeginLine directive, 132
  20732.  
  20733.  
  20734.           ___________________________________________________________________
  20735.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  356
  20736.  
  20737.                                                                         INDEX
  20738.           ___________________________________________________________________
  20739.  
  20740.  
  20741.           _BG internal variable, 82           Command interpreter, 41
  20742.           Boxes, drawing, 211                 Command line, 54
  20743.           BREAK, 181                             arguments, see replaceable
  20744.           .BTM files, 99, 257                     parameters
  20745.                                                  automatic directory changes,
  20746.                                                   61
  20747.                -- C --                           echoing of, 215, 216
  20748.                                                  editing, 55, 132, 133
  20749.           CALL, 101, 108, 183                    editing mode, 55, 128, 296
  20750.           CANCEL, 101, 183, 184, 276             expanded, 216
  20751.           Carriage return character, 94          filename completion, 59
  20752.           Case (upper / lower), 130, 297         help, 62
  20753.           CD, 185                                history, 56, see also
  20754.           CDD, 187                                History list
  20755.           CDPATH environment variable,           history window, 58
  20756.            80, 116                               input method, 129, 296
  20757.              and automatic directory             multiple commands, 61
  20758.               changes, 62                        processing of, 44
  20759.              and CD, 186                         prompt, 271
  20760.              and CDD, 187                     Command processing, 43
  20761.              and PUSHD, 275                   Command Reference Guide, 162
  20762.           Changing directories, 61, 185,      Command tail, 44, 45
  20763.            187, 270, 274                      Command, 4DOS startup, 112,
  20764.           @CHAR variable function, 86          113, 114
  20765.           CHCP, 189, 199, 206, 303               and multitaskers, 150
  20766.           CHDIR, 185                          COMMAND.COM
  20767.           CLS, 101, 190                          in DOS version 2.x, 113
  20768.              and DESQView, 154                   in Microsoft Windows, 152
  20769.           CMDLINE environment variable,          in multitasker DOS windows,
  20770.            80                                     149
  20771.           Code page, 82, 189                     message server, 136
  20772.           _CODEPAGE internal variable, 82     CommandEscape directive, 133
  20773.           Cold reboot, 278                    Commands
  20774.           COLOR, 101, 192                        conditional execution of,
  20775.              and DESQView, 154                    244
  20776.           ColorDir directive, 130                external, 44, 162, 164, 267
  20777.           COLORDIR environment variable,         format of, 164
  20778.            80, 116, 205, 288                     help for, 62, 234
  20779.              and DESQView, 154                   internal, 44, 162
  20780.              and redirection, 206                   disabling, 168, 295
  20781.           Colors, see Screen; Monochrome         list of, 163, 168
  20782.            monitor                               new, 164
  20783.           _COLUMN internal variable, 82          order of execution, 44, 77
  20784.           _COLUMNS internal variable, 82         programming interface, 337
  20785.           Command grouping, 91, see also         types of, 163, 164
  20786.            EXCEPT, FOR, GLOBAL, and IF        CommandSep directive, 128, 295
  20787.           Command history, see History        Comments
  20788.            list                                  in 4DOS.INI, 119
  20789.  
  20790.  
  20791.           ___________________________________________________________________
  20792.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  357
  20793.  
  20794.                                                                         INDEX
  20795.           ___________________________________________________________________
  20796.  
  20797.  
  20798.              in alias files, 177                 during SELECT, 287
  20799.              in AUTOEXEC.BAT, 159             Ctrl-C, see Ctrl-Break
  20800.              in batch files, 280              Ctrl-X, see Escape character
  20801.              in CONFIG.SYS, 15, 16, 159       Ctrl-Z, 196
  20802.              in environment variable          CTTY, 67, 198
  20803.               files, 293                      Current drive and directory, 47
  20804.           Compatibility, 9, 11                   changing, see Changing
  20805.              with hardware, 139                   directories
  20806.              with other software, 148,           retrieving, 82
  20807.               156                                saving temporarily, 218,
  20808.           Compound character, 295                 270, 274, 298
  20809.           COMSPEC environment variable,       Cursor
  20810.            80, 115                               positioning, 284, 285, 313
  20811.              and disk swapping, 126              shape, 128, 143, 296
  20812.              and DOS FORMAT /S, 149           CursorIns directive, 128, 143,
  20813.              and LOG file location, 259        296
  20814.              and multitaskers, 150            CursorOver directive, 128, 143,
  20815.              checking, 110                     296
  20816.              on laptop and notebook           _CWD internal variable, 82
  20817.               computers, 147                  _CWDS internal variable, 82
  20818.              removing, 309                    _CWP internal variable, 82
  20819.              setting automatically, 110       _CWPS internal variable, 82
  20820.           Conditional commands, 91
  20821.           CONFIG.SYS, 41, 109
  20822.              4DOS commands in, 110                 -- D --
  20823.              and ANSI driver, 144
  20824.              and DOS bug, 112                 Daily execution of batch file,
  20825.           Configuration, 4DOS, 80, 109,        90
  20826.            118                                DATE, 199
  20827.           CONsole device, 198, 301, see       _DATE internal variable, 82
  20828.            also Standard input, Standard      @DATE variable function, 86
  20829.            output, and Standard error         Day of week, 83
  20830.           Coprocessor, see Numeric            Default directory, see Current
  20831.            coprocessor                         drive and directory
  20832.           COPY, 193                           Default drive, see Current
  20833.           Country code, 199, 206, 273,         drive and directory
  20834.            303                                DEL, 145, 200
  20835.           CPU, 49, 139                        Del directive, 132
  20836.           _CPU internal variable, 82          DELAY, 202
  20837.           CritFail directive, 135, 148        Deleting files, 200
  20838.           Critical errors, 147                DelHistory directive, 133
  20839.              automatic Fail response,         DelToBeginning directive, 132
  20840.               111, 114, 135                   DelToEnd directive, 132
  20841.           Ctrl-Break                          DelWordLeft directive, 132
  20842.              checking, 181                    DelWordRight directive, 132
  20843.              during DELAY, 202                DESCRIBE, 132, 203
  20844.              during INKEY, 246                @DESCRIPT variable function, 86
  20845.              during PAUSE, 269
  20846.  
  20847.  
  20848.           ___________________________________________________________________
  20849.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  358
  20850.  
  20851.                                                                         INDEX
  20852.           ___________________________________________________________________
  20853.  
  20854.  
  20855.           DESCRIPT.ION, 203, see File            shell (defined), 1
  20856.            descriptions                          structure, 41
  20857.           Descriptions, see File                 version 2.x, 110, 113
  20858.            descriptions                       _DOS internal variable, 83
  20859.           DESQView, 153                       @DOSMEM variable function, 86
  20860.              and secondary shells, 113,       _DOSVER internal variable, 83
  20861.               121                             _DOW internal variable, 83
  20862.              detecting, 83, 84                Down directive, 132
  20863.           Detecting 4DOS, 335                 DRAWBOX, 102, 142, 211
  20864.           DIR, 145, 204                       DRAWHLINE, 102, 142, 213
  20865.              and include lists, 75            DRAWVLINE, 102, 142, 214
  20866.              directory size limits, 206       Drive, see Disk drives
  20867.           Directories, see Subdirectories     Drive letter, 46
  20868.           Directory stack, 274                _DV internal variable, 83
  20869.              clearing, 270
  20870.              displaying, 210
  20871.              size, 274                             -- E --
  20872.           DIRS, 210, 270, 274
  20873.           Disk drives, 144                    ECHO, 215
  20874.              drive letter, 46                    ANSI sequences in, 94
  20875.              space on, 86, 227                   at command line, 216
  20876.              swapping to, 126, 300               in batch files, 99, 102,
  20877.              testing status of, 88                105, 280
  20878.              volume label, 87, 312                  default state, 127, 297
  20879.              write verification on, 311             inheritance, 183
  20880.           _DISK internal variable, 82         ECHOS, 102, 217
  20881.           @DISKFREE variable function, 86     Editing aliases and environment
  20882.              on networks, 155                  variables, 219
  20883.           Diskless workstations, 155          EditMode directive, 128, 296
  20884.           @DISKTOTAL variable function,       EGA, 142, 144, 189, 243
  20885.            86                                 ELSE, in IFF, 244
  20886.              on networks, 155                 ELSEIFF, in IFF, 244
  20887.           @DISKUSED variable function, 86     EMS, see Memory
  20888.              on networks, 155                 @EMS variable function, 86
  20889.           Display colors, see Screen;         EndHistory directive, 134
  20890.            Video                              ENDIFF, in IFF, 244
  20891.           DOS, 149                            EndLine directive, 132
  20892.              APPEND command, 149              ENDLOCAL, 101, 104, 218, 298,
  20893.              bug in CONFIG.SYS                 309
  20894.               processing, 112                 ENDTEXT, 102, 302
  20895.              command interpreter, 42          _ENV internal variable, 83
  20896.              commands, help for, 62, 164,     EnvFree directive, 124, 292
  20897.               234                             Environment, 48, 78, 291
  20898.              compatibility box, see OS/2         loading in high memory, 127
  20899.              external commands, 162              master, 219, 292, 309
  20900.              FORMAT /S command, 149              memory space for
  20901.              hidden files, 41                       displaying, 262
  20902.              memory, see Memory                     setting, 111, 114, 124
  20903.  
  20904.  
  20905.           ___________________________________________________________________
  20906.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  359
  20907.  
  20908.                                                                         INDEX
  20909.           ___________________________________________________________________
  20910.  
  20911.  
  20912.                 testing, 83                   @EXTENDED variable function, 87
  20913.              saving temporarily, 218, 298     Extension, see File names
  20914.              size, and compatibility          External commands, see Commands
  20915.               problems, 158
  20916.           Environment directive, 124, 292
  20917.           Environment variables, 48, 78,           -- F --
  20918.            291
  20919.              and INKEY, 246                   _FG internal variable, 83
  20920.              and INPUT, 249                   File attributes, 47, 178
  20921.              characters in name, 78              and COPY, 196, 197
  20922.              creating, 291                       and DEL, 201
  20923.              displaying, 291                     and DIR, 204, 207, 209, 225
  20924.              editing, 219                        and EXCEPT, 220
  20925.              expansion, 94                       and GLOBAL, 228
  20926.              nesting, 78                         and MOVE, 263, 265
  20927.              reading from a file, 292            and REN, 282
  20928.              referencing, 78                     and SELECT, 289
  20929.              removing, 309                       setting, 178
  20930.              spaces in, 292                      subdirectory, 179
  20931.           ERASE, 145, 200                        testing, 86
  20932.           EraseLine directive, 132               viewing, 178
  20933.           Error level, see Exit code             volume label, 179
  20934.           Error messages, 315                 File descriptions, 203
  20935.           ERRORLEVEL test, in IF and IFF,        and disk performance, 145
  20936.            241                                   programming for, 338
  20937.           Escape character, 93, 128, 295         retrieving, 86
  20938.           EscapeChar directive, 128, 295         sorting by, 208, 289
  20939.           ESET, 132, 219                      File names, 45
  20940.              and environment variables,          parts of, 45
  20941.               78, 292                               separating, 87, 88
  20942.              and PATH, 158, 267                  shorthand for, 70
  20943.           @EVAL variable function, 86            unique, 89
  20944.           EXCEPT, 92, 136, 220                @FILEDATE variable function, 87
  20945.              and DEL /Z, 201                  Filename completion, 59
  20946.           @EXEC variable function, 87         Files, 45
  20947.           ExecLine directive, 132                adding line numbers to, 307
  20948.           Executable extensions, 44, 75          copying, 193
  20949.              wildcards in, 77                    date, 48, 87, 199, 204
  20950.           EXIST test, in IF and IFF, 242         deleting, 200
  20951.           EXIT, 117, 222                         displaying, 255, 307
  20952.           Exit code, 81, 222, 276                moving, 263, 281
  20953.              and GLOBAL, 229                     reading, in FOR, 223
  20954.              and IF tests, 241                   renaming, 281
  20955.           Expanded memory, see Memory            retrieving lines from, 87
  20956.           @EXT variable function, 87             searching for, 89
  20957.           Extended key codes, see Key            selecting, 286
  20958.            codes                                 size of, 87, 204
  20959.           Extended memory, see Memory            time stamp, 48, 87, 303
  20960.  
  20961.  
  20962.           ___________________________________________________________________
  20963.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  360
  20964.  
  20965.                                                                         INDEX
  20966.           ___________________________________________________________________
  20967.  
  20968.  
  20969.              true path of, 89, 306            History list, 56, 236
  20970.           @FILESIZE variable function, 87        controlling, 128, 237
  20971.           @FILETIME variable function, 87        inheritance in secondary
  20972.           FineSwap directive, 135                 shells, 136
  20973.           Floppy disks, 144                      memory space for, 125, 262
  20974.           FOR, 92, 102, 136, 223                 reading from a file, 237
  20975.           Form feed character, 94             History window, 58, 129
  20976.           FORMAT /S command, 149              HistWinBegin directive, 134
  20977.           FREE, 227                           HistWinColor directive, 129
  20978.              on networks, 155                 HistWinEdit directive, 134
  20979.           Free disk space, see disk space     HistWinEnd directive, 134
  20980.           Free memory, see Memory             HistWinExec directive, 134
  20981.           @FULL variable function, 87         HistWinHeight directive, 129
  20982.           FullINT2E directive, 136            HistWinLeft directive, 129
  20983.                                               HistWinOpen directive, 134
  20984.                                               HistWinTop directive, 129
  20985.                -- G --                        HistWinWidth directive, 129
  20986.                                               HMA, see Memory
  20987.           General Concepts, 41
  20988.           GLOBAL, 92, 136, 228
  20989.           Glossary, 342                            -- I --
  20990.           GOSUB, 102, 107, 230, 283
  20991.           GOTO, 102, 232                      IF, 92, 102, 136, 238
  20992.              and IFF, 106, 245                   conditions, 239
  20993.           Guided Tour, 18                     IFF, 102, 244
  20994.                                                  and GOSUB, 230
  20995.                                                  and GOTO, 106, 245
  20996.                -- H --                           conditions, 239
  20997.                                               Include lists, 74
  20998.           Hard drives, 144                    @INDEX variable function, 87
  20999.           Hardware compatibility, see         Inherit directive, 136
  21000.            Compatibility                      INKEY, 102, 105, 246
  21001.           HELP, 62, 234                       INPUT, 102, 132, 249
  21002.              and external commands, 164       Ins directive, 133
  21003.              and mouse, 64                    Installable commands, 337
  21004.              location of files, 124           Installation, 13
  21005.              on monochrome screen, 147,          manual, 14
  21006.               235                                reversing, 15
  21007.              options, 124, 147, 235              with monochrome monitor, 13
  21008.           Help directive, 134                 INT 2E, 339
  21009.           HELPCFG program, 147, 234           INT 2F, 335
  21010.           HelpOptions directive, 124, 147     @INT variable function, 87
  21011.           HelpPath directive, 124, 234        Internal commands, see Commands
  21012.           Hidden attribute, see File          Internal variables, 81, see
  21013.            attributes                          also names of individual
  21014.           HistMin directive, 128               variables
  21015.           HISTORY, 117, 236                      in aliases, 176
  21016.           History directive, 125                 in batch files, 84, 100
  21017.  
  21018.  
  21019.           ___________________________________________________________________
  21020.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  361
  21021.  
  21022.                                                                         INDEX
  21023.           ___________________________________________________________________
  21024.  
  21025.  
  21026.           ISALIAS test, in IF and IFF,           screen size, 130, 143, 296
  21027.            242                                ListColors directive, 130
  21028.           ISDIR test, in IF and IFF, 242      ListFind directive, 135
  21029.           ISINTERNAL test, in IF and IFF,     ListHighBit directive, 135
  21030.            242                                ListNext directive, 135
  21031.                                               ListPrint directive, 135
  21032.                                               ListWrap directive, 135
  21033.                -- J --                        Literal keystrokes, 55
  21034.                                               LOADBTM, 99, 102, 257
  21035.           JOIN command, 306                   LOADHIGH, 140, 141, 254
  21036.                                               LOG, 106, 117, 259
  21037.                                               Log file location, 259
  21038.                -- K --                        LogName directive, 125
  21039.                                               Lower case, 130, 297
  21040.           Key                                 @LOWER variable function, 88
  21041.              codes, 51, 325, 329              @LPT variable function, 88
  21042.              mapping, 131
  21043.                 for all input, 132
  21044.                 for command line editing,          -- M --
  21045.                  133
  21046.                 for history window, 134       Master environment, see
  21047.                 for LIST, 135                  Environment
  21048.              names, 123, 172, 247, 251        MD, 261
  21049.           Keyboard, 51                        MEMORY, 141, 158, 262
  21050.           KEYSTACK, 68, 102, 106, 250            and QEMM, 141
  21051.              programming interface, 336       Memory, 49, 140
  21052.           Keystroke aliases, see Aliases         base, 49
  21053.           KSTACK.COM, 15, 68, 115, 250              4DOS's use of, 140
  21054.                                                     amount of, 86
  21055.                                                     DOS in, 310
  21056.                -- L --                           expanded (EMS), 49, 50
  21057.           @LABEL variable function, 87              4DOS's use of, 140
  21058.           Labels, in batch files, 230,              amount of, 86, 262
  21059.            232                                      hardware, 141
  21060.           Laptop computers, 145                     swapping to, 125, 142,
  21061.           Left directive, 133                        300
  21062.           @LEN variable function, 87             extended, 50
  21063.           LH, 140, 141, 254                         4DOS's use of, 141
  21064.           LIM EMS, see Memory                       amount of, 87, 262
  21065.           Line feed character, 94                extended (XMS), 50
  21066.           @LINE variable function, 87               4DOS's use of, 140, 141
  21067.           LineInput directive, 129, 296             amount of, 90, 262
  21068.           Lines, drawing, on screen, 213,           swapping to, 125, 300
  21069.            214                                   free, 262
  21070.           LIST, 255                              high memory area (HMA), 50,
  21071.              default colors, 130                  141
  21072.              keys used with, 132, 135               DOS in, 310
  21073.              output method, 142                     status of, 262
  21074.  
  21075.  
  21076.           ___________________________________________________________________
  21077.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  362
  21078.  
  21079.                                                                         INDEX
  21080.           ___________________________________________________________________
  21081.  
  21082.  
  21083.              problems with, 142               NoClobber directive, 130, 296
  21084.              upper, 49                        NormalEditKey directive, 134
  21085.              upper memory blocks (UMBs),      NormalHWinKey directive, 134
  21086.               50                              NormalKey directive, 132, 133
  21087.                 4DOS's use of, 127, 140          and keystroke aliases, 173
  21088.                 and LOADHIGH, 254             NormalListKey directive, 135
  21089.           Memory resident programs, see       NOT, in IF and IFF, 238, 242,
  21090.            TSRs                                244
  21091.           Messages, displaying, 215, 217      Notebook computers, 145
  21092.           MessageServer directive, 136        Novell Netware, 137, 154
  21093.           Microsoft Windows, 150, 152         Numeric coprocessor, 83, 139
  21094.              and secondary shells, 113,       Numeric tests, in IF and IFF,
  21095.               121                              241
  21096.              detecting, 84, 153
  21097.           MKDIR, 261
  21098.           _MONITOR internal variable, 83           -- O --
  21099.           Monochrome monitor
  21100.              and HELP, 147, 235               Operating system, detecting
  21101.              and installation, 13              type of, 83
  21102.              and Microsoft Windows, 152       Options
  21103.           Mouse, in HELP, 64                     in commands, 165
  21104.           MOVE, 263                              startup, see Startup Options
  21105.              and SELECT, 264                  Or (||) in conditional
  21106.           Multiple commands, 61                commands, 91
  21107.              in aliases, 169                  .OR., in IF and IFF, 238, 242,
  21108.              separator character, 61, 94,      244
  21109.               128, 295                        OS/2
  21110.           Multiple filenames, 73                 4OS2 product, 1
  21111.           Multitasking software, 149             command grouping, 92
  21112.              and disk swapping, 151              detecting, 83
  21113.              DESQView, 153                       DOS compatibility box, 9, 83
  21114.              Microsoft Windows, 152                 in OS/2 version 2.0, 42,
  21115.                                                      84, 222
  21116.  
  21117.                -- N --
  21118.                                                    -- P --
  21119.           @NAME variable function, 88
  21120.           _NDP internal variable, 83          Parent directory, 47, 71, 185,
  21121.           Networks, 154                        187, 261
  21122.              and pipes, 156                   Parsing, 45
  21123.              disk space calculations on,      PATH command, 158, 267
  21124.               155                             PATH environment variable, 49,
  21125.              disk swapping on, 137, 155        80, 115
  21126.              drive names on, 46                  "." in, 268
  21127.              file and directory names on,        and @SEARCH variable
  21128.               155                                 function, 89
  21129.           NextFile directive, 134                avoiding search of, 35
  21130.           NextHistory directive, 134             changing, 219, 267
  21131.  
  21132.  
  21133.           ___________________________________________________________________
  21134.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  363
  21135.  
  21136.                                                                         INDEX
  21137.           ___________________________________________________________________
  21138.  
  21139.  
  21140.              format of, 267
  21141.              invalid directory in, 268
  21142.              length of, 157, 268                   -- R --
  21143.              searching path, 45
  21144.              viewing, 267                     RAM, see Memory
  21145.           @PATH variable function, 88         RAM disk, 46, 141
  21146.           Path, of a file, 45, 47                swapping to, 125
  21147.              and aliases, 97                  RD, 277
  21148.              extracting from full file        Read-only attribute, see File
  21149.               name, 88                         attributes
  21150.              finding full path name, 87       @READY variable function, 88
  21151.              finding true path, 89, 306       REBOOT, 278
  21152.              if omitted, 47                   Redirection, 65
  21153.              in executable extensions, 76        alternative methods, 301,
  21154.              in include lists, 75                 314
  21155.           PAUSE, 102, 105, 269                   and COLORDIR environment
  21156.           PauseOnError directive, 120,            variable, 206
  21157.            125                                   and command grouping, 92
  21158.           Percent sign, see % sign               and NoClobber, 66, 296
  21159.           Pipes, 67, 301                         capturing batch file output,
  21160.              and networks, 156                    106
  21161.           POPD, 210, 270, 274                    nested, 67
  21162.           PrevFile directive, 134                preventing file overwrites,
  21163.           PrevHistory directive, 134              130
  21164.           [Primary], see 4DOS.INI             Reduce directive, 136
  21165.           Primary shell, see Shell            Registration, 5
  21166.           Printer                             REM, 102, 159, 280
  21167.              checking status of, 88              in AUTOEXEC.BAT, 16, 159
  21168.              sending control codes to, 94        in CONFIG.SYS, 15, 16, 159
  21169.              sending files to, 193            @REMOTE variable function, 88
  21170.           Programming for 4DOS, see           @REMOVABLE variable function,
  21171.            Technical Information               88
  21172.           PROMPT command, 117, 150, 271       REN, 263, 281
  21173.              ANSI sequences in, 94, 272       RENAME, 263, 281
  21174.              changing for secondary           Replaceable parameters
  21175.               shell, 85                          in aliases, 175, 176
  21176.           PROMPT environment variable,           in batch files, 100, 299
  21177.            80, 116                            ReserveTPA directive, 136
  21178.           Prompt Solution, The, 5             RETURN, 102, 230, 283
  21179.           PUSHD, 210, 270, 274                Right directive, 133
  21180.                                               RMDIR, 277
  21181.                                               ROM, booting from, 145
  21182.                -- Q --                        Root directory, 46
  21183.                                               _ROW internal variable, 83
  21184.           QUIT, 102, 183, 184, 276            _ROWS internal variable, 83
  21185.           Quoting, of arguments, 94
  21186.  
  21187.  
  21188.  
  21189.  
  21190.           ___________________________________________________________________
  21191.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  364
  21192.  
  21193.                                                                         INDEX
  21194.           ___________________________________________________________________
  21195.  
  21196.                -- S --
  21197.                                                  /C(ompound character), 128,
  21198.           SaveHistory directive, 134              295
  21199.           Scan codes, see Key codes              /E(scape character), 93,
  21200.           SCREEN, 102, 284                        128, 295
  21201.           Screen, see also Video                 /I(nternal), 168, 242, 295
  21202.              clearing, 190                       /L(ine), 129, 296
  21203.              colors, see also Monochrome         /M(ode), 128, 296
  21204.               monitor                            /N(o clobber), 130, 296
  21205.                 and ANSI driver, 53, 131,        /R(ows), 130, 143, 296
  21206.                  295                             /S(hape), 128, 143, 296
  21207.                 and cursor, 143                  /U(pper), 84, 130, 207, 297
  21208.                 in DIR, 205                      /V(erbose), 99, 127, 297
  21209.                 in HELP, 147, 234                and 4DOS.INI, 120, 294
  21210.                 in history window, 129        SETLOCAL, 101, 102, 104, 298,
  21211.                 in LIST, 130, 256              309
  21212.                 in PROMPT, 272                Shell
  21213.                 in SELECT, 130, 288              DOS shell (defined), 1
  21214.                 of boxes, 211                    level, 83, 273
  21215.                 of lines, 213, 214               primary, 42
  21216.                 of text, 285, 302, 313              and multitaskers, 149,
  21217.                 setting defaults, 130,               151
  21218.                  190, 192, 295                      startup options, 110
  21219.                 setting, in 4START, 85,          secondary, 42
  21220.                  117                                and COMSPEC, 115
  21221.                 testing, 82, 83                     and multitaskers, 149,
  21222.              size, 52, 82, 83, 130, 142,             150
  21223.               296                                   exiting from, 222
  21224.           ScreenRows directive, 130, 143,           inheritance, 120, 136,
  21225.            296                                       176, 294
  21226.           SCRPUT, 102, 142, 285                     startup options, 113
  21227.           Search path, see PATH                  visual shell, 42
  21228.            environment variable               _SHELL internal variable, 83
  21229.           @SEARCH variable function, 89       SHELL= line, in CONFIG.SYS, 15,
  21230.           [Secondary], see 4DOS.INI            42, 110, 146
  21231.           Secondary shell, see Shell             and DOS version 2.x, 113
  21232.           SELECT, 286                         SHIFT, 100, 102, 299
  21233.              and command grouping, 92         Software compatibility, see
  21234.              and include lists, 75             Compatibility
  21235.              and MOVE, 264                    Sound, see BEEP
  21236.              and stack size, 136              StackSize directive, 136
  21237.              default colors, 130              Standard error device, 65
  21238.              keys used with, 132              Standard input device, 65, 256,
  21239.              output method, 142                301, 314
  21240.              screen size, 130, 143, 296       Standard output device, 65,
  21241.           Serial port, 198                     301, 314
  21242.           SET, 78, 291                        Startup options, 110
  21243.           SETDOS, 294                            //iniline, 112, 114, 150
  21244.              /A(NSI), 127, 144, 191, 192,
  21245.               295
  21246.  
  21247.           ___________________________________________________________________
  21248.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  365
  21249.  
  21250.                                                                         INDEX
  21251.           ___________________________________________________________________
  21252.  
  21253.  
  21254.              @d:\path\inifile, 111, 113,
  21255.               150
  21256.              commands in, 112, 114                 -- T --
  21257.              for secondary shells, 113
  21258.           StdColors directive, 130            Tab character, 94
  21259.           Stopwatch, see TIMER                Task switching software, see
  21260.           String tests, in IF and IFF,         Multitasking software
  21261.            239                                Technical Information, 335
  21262.           Subdirectories, 46                     DESCRIPT.ION, 338
  21263.              attributes of, 178                  detecting 4DOS, 335
  21264.              changing, see Changing              installable commands, 337
  21265.               directories                        INT 2E, 339
  21266.              copying, 197                        KEYSTACK, 336
  21267.              creating, 261                    Technical support, 5, 7
  21268.              deleting files from, 201         TEE, 301
  21269.              descriptions for, 203            TEMP environment variable, 80,
  21270.              executing commands in, 228        116, 156
  21271.              hidden, 228                      TEMP4DOS environment variable,
  21272.              moving, 263, 265                  80, 116, 156
  21273.              name, maximum length of, 47      TEXT, 102, 302
  21274.              removing, 201, 265, 277          THEN, in IFF, 244
  21275.              renaming, 281                    TIME, 303
  21276.              testing for, 242                 _TIME internal variable, 83
  21277.           Subdirectory attribute, see         @TIME variable function, 89
  21278.            File attributes                    TIMER, 103, 304
  21279.           SUBST command, 306                  Tour, of 4DOS features, 18
  21280.           @SUBSTR variable function, 89       TRUENAME, 306
  21281.           Swapping, 125                       @TRUENAME variable function,
  21282.              and compatibility, 142            89, 306
  21283.              and multitasking software,       TSRs, 148
  21284.               151                                and .BTM files, 257
  21285.              enabling and disabling, 300         and 4START, 117
  21286.              file names used by, 126, 151        and multitasker startup
  21287.              on networks, 155                     files, 150
  21288.              reduced, 136                        and SETLOCAL, 298
  21289.              types of, 125                       and swapping state, 300
  21290.           SWAPPING command, 300                  loading order, 160
  21291.           Swapping directive, 125, 140,       TYPE, 307
  21292.            156, 160
  21293.           SwapReopen directive, 137
  21294.           Switches, in commands, 165               -- U --
  21295.           System
  21296.              attribute, see File              UltraVision, 144
  21297.               attributes                      UMBEnvironment directive, 127,
  21298.              date, 199                         140, 160
  21299.              rebooting, 278                      and DESQView, 154
  21300.              tests, in IF and IFF, 241        UMBLoad directive, 127, 140,
  21301.              time, 303                         160
  21302.  
  21303.  
  21304.           ___________________________________________________________________
  21305.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  366
  21306.  
  21307.                                                                         INDEX
  21308.           ___________________________________________________________________
  21309.  
  21310.  
  21311.              and DESQView, 154                      and DEL, 145, 201
  21312.           UMBs, see Memory                       in executable extensions, 77
  21313.           UNALIAS, 104, 308                      in include lists, 74
  21314.           Uninstalling 4DOS, 15                  in multiple filenames, 73
  21315.           @UNIQUE variable function, 89       _WIN internal variable, 84, 153
  21316.           UNSET, 78, 101, 309                 Windows, see Microsoft Windows
  21317.           Up directive, 133                   @WORD variable function, 90
  21318.           Upgrades, 5                         WordLeft directive, 133
  21319.           Upper case, 130, 297                WordRight directive, 133
  21320.           @UPPER variable function, 89
  21321.           UpperCase directive, 130, 207,
  21322.            297                                     -- X --
  21323.  
  21324.                                               XMS, see Memory
  21325.                -- V --                        @XMS variable function, 90
  21326.                                               .XOR., in IF and IFF, 238, 242,
  21327.           Variable expansion, 94               244
  21328.           Variable functions, 85, see
  21329.            also names of individual
  21330.            functions                               -- Y --
  21331.              in aliases, 90, 176
  21332.              in batch files, 90, 100          Y, 314
  21333.           VER, 310
  21334.           VERIFY, 197, 311
  21335.           Version numbers, 81, 83, 310
  21336.           Vertical text display, 313
  21337.           VGA, 142, 144, 189, 243
  21338.           Video hardware, 52, 142, see
  21339.            also Screen
  21340.           _VIDEO internal variable, 84
  21341.           VOL, 312
  21342.           Volume label, see Disk drives
  21343.           Volume label attribute, see
  21344.            File attributes
  21345.           VSCRPUT, 103, 142, 313
  21346.  
  21347.  
  21348.                -- W --
  21349.  
  21350.           Warm reboot, 278
  21351.           Warning mark, see !
  21352.           Wildcards, 71
  21353.              and @SEARCH variable
  21354.               function, 89
  21355.              and filename completion, 60
  21356.              and renaming subdirectories,
  21357.               282
  21358.              extended, 72
  21359.  
  21360.  
  21361.           ___________________________________________________________________
  21362.           Copyright 1991, JP Software Inc.      4DOS Reference Manual  /  367
  21363.